Installations
npm install @oozcitak/uts46
Releases
Unable to fetch releases
Developer
oozcitak
Developer Guide
Module System
CommonJS
Min. Node Version
>=6.0
Typescript Support
Yes
Node Version
10.14.2
NPM Version
6.8.0
Statistics
4 Stars
51 Commits
2 Watching
4 Branches
1 Contributors
Updated on 21 Mar 2023
Languages
TypeScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
9,299
Last day
162.9%
92
Compared to previous day
Last week
17.1%
308
Compared to previous week
Last month
49.9%
1,196
Compared to previous month
Last year
809%
6,499
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
6
UTS46
A Javascript implementation of Unicode IDNA Compatibility Processing (UTS 46).
Version
Current version implements the standard as of version 24.
Documentation
The library exports the following functions:
toASCII(domainName, options)
Converts a domain name string to ASCII. Returns the converted string or null
if an
error occurs during conversion.
domainName
- a domain name stringoptions
- an object with the following boolean properties:useSTD3ASCIIRules
- determines whether to abide by the rules in STD3. These rules exclude ASCII characters outside the set consisting of A-Z, a-z, 0-9, and U+002D ( - ) HYPHEN-MINUS. Defaults totrue
.checkHyphens
- determines whether to allow a domain name label to start or end with a U+002D ( - ) HYPHEN-MINUS character and also to contain a hyphen-minus in both its third and fourth characters. Defaults totrue
.checkBidi
- determines whether to abide by the rules of RFC 5893 for a bidirectional domain name. Defaults totrue
.checkJoiners
- determines whether to abide by the rules of RFC 5892 ContextJ. Defaults totrue
.transitionalProcessing
- determines whether to replace deviation characters in the domain name string. Defaults totrue
.verifyDnsLength
- determines whether to apply DNS length restrictions to the domain name string and its labels. Defaults totrue
.
toUnicode(domainName, options, output)
Converts a domain name string to Unicode.
domainName
- a domain name stringoptions
- an object with the following boolean properties:useSTD3ASCIIRules
- determines whether to abide by the rules in STD3. These rules exclude ASCII characters outside the set consisting of A-Z, a-z, 0-9, and U+002D ( - ) HYPHEN-MINUS. Defaults totrue
.checkHyphens
- determines whether to allow a domain name label to start or end with a U+002D ( - ) HYPHEN-MINUS character and also to contain a hyphen-minus in both its third and fourth characters. Defaults totrue
.checkBidi
- determines whether to abide by the rules of RFC 5893 for a bidirectional domain name. Defaults totrue
.checkJoiners
- determines whether to abide by the rules of RFC 5892 ContextJ. Defaults totrue
.transitionalProcessing
- Determines whether to replace deviation characters in the domain name string. Defaults totrue
.
output
- an object containing a single booleanerror
property that is set on return indicating if any errors were encountered during conversion.
Examples
1// toUnicode without transitional processing
2toUnicode("fass.de", { transitionalProcessing: false }); // "fass.de"
3toUnicode("faß.de", { transitionalProcessing: false }); //"faß.de"
4toUnicode("Faß.de", { transitionalProcessing: false }); // "faß.de"
5toUnicode("xn--fa-hia.de", { transitionalProcessing: false }); // "faß.de"
6
7// toASCII with transitional processing
8toASCII("fass.de"); // "fass.de"
9toASCII("faß.de"); // "fass.de"
10toASCII("Faß.de"); // "fass.de"
11toASCII("xn--fa-hia.de"); // "xn--fa-hia.de"
12
13// toASCII without transitional processing'
14toASCII("fass.de", { transitionalProcessing: false }); // "fass.de"
15toASCII("faß.de", { transitionalProcessing: false }); // "xn--fa-hia.de"
16toASCII("Faß.de", { transitionalProcessing: false }); // "xn--fa-hia.de"
17toASCII("xn--fa-hia.de", { transitionalProcessing: false }); // "xn--fa-hia.de"
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/12 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 18 are checked with a SAST tool
Reason
16 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
1.7
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More