Gathering detailed insights and metrics for punycode-okam
Gathering detailed insights and metrics for punycode-okam
Gathering detailed insights and metrics for punycode-okam
Gathering detailed insights and metrics for punycode-okam
A robust Punycode converter that fully complies to RFC 3492 and RFC 5891.
npm install punycode-okam
Typescript
Module System
Node Version
NPM Version
99.5
Supply Chain
100
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,744,474
Last Day
8,405
Last Week
64,687
Last Month
241,527
Last Year
1,709,991
MIT License
1,640 Stars
150 Commits
159 Forks
36 Watchers
2 Branches
19 Contributors
Updated on Jul 05, 2025
Minified
Minified + Gzipped
Latest Version
1.4.1
Package Id
punycode-okam@1.4.1
Unpacked Size
22.53 kB
Size
7.86 kB
File Count
4
NPM Version
9.6.5
Node Version
18.14.0
Published on
Jul 24, 2023
Cumulative downloads
Total Downloads
Last Day
66.6%
8,405
Compared to previous day
Last Week
15.4%
64,687
Compared to previous week
Last Month
-4.2%
241,527
Compared to previous month
Last Year
4,858.9%
1,709,991
Compared to previous year
A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.
This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:
punycode.c
by Markus W. Scherer (IBM)punycode.c
by Ben Noordhuispunycode.js
by Ben Noordhuis (note: not fully compliant)This project is bundled with Node.js v0.6.2+ and io.js v1.0.0+.
Via npm (only required for Node.js releases older than v0.6.2):
1npm install punycode
Via Bower:
1bower install punycode
Via Component:
1component install bestiejs/punycode.js
In a browser:
1<script src="punycode.js"></script>
In Node.js, io.js, Narwhal, and RingoJS:
1var punycode = require('punycode');
In Rhino:
1load('punycode.js');
Using an AMD loader like RequireJS:
1require( 2 { 3 'paths': { 4 'punycode': 'path/to/punycode' 5 } 6 }, 7 ['punycode'], 8 function(punycode) { 9 console.log(punycode); 10 } 11);
punycode.decode(string)
Converts a Punycode string of ASCII symbols to a string of Unicode symbols.
1// decode domain name parts 2punycode.decode('maana-pta'); // 'mañana' 3punycode.decode('--dqo34k'); // '☃-⌘'
punycode.encode(string)
Converts a string of Unicode symbols to a Punycode string of ASCII symbols.
1// encode domain name parts 2punycode.encode('mañana'); // 'maana-pta' 3punycode.encode('☃-⌘'); // '--dqo34k'
punycode.toUnicode(input)
Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.
1// decode domain names
2punycode.toUnicode('xn--maana-pta.com');
3// → 'mañana.com'
4punycode.toUnicode('xn----dqo34k.com');
5// → '☃-⌘.com'
6
7// decode email addresses
8punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq');
9// → 'джумла@джpумлатест.bрфa'
punycode.toASCII(input)
Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII.
1// encode domain names
2punycode.toASCII('mañana.com');
3// → 'xn--maana-pta.com'
4punycode.toASCII('☃-⌘.com');
5// → 'xn----dqo34k.com'
6
7// encode email addresses
8punycode.toASCII('джумла@джpумлатест.bрфa');
9// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'
punycode.ucs2
punycode.ucs2.decode(string)
Creates an array containing the numeric code point values of each Unicode symbol in the string. While JavaScript uses UCS-2 internally, this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
1punycode.ucs2.decode('abc'); 2// → [0x61, 0x62, 0x63] 3// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: 4punycode.ucs2.decode('\uD834\uDF06'); 5// → [0x1D306]
punycode.ucs2.encode(codePoints)
Creates a string based on an array of numeric code point values.
1punycode.ucs2.encode([0x61, 0x62, 0x63]); 2// → 'abc' 3punycode.ucs2.encode([0x1D306]); 4// → '\uD834\uDF06'
punycode.version
A string representing the current Punycode.js version number.
After cloning this repository, run npm install --dev
to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul globally using npm install istanbul -g
.
Once that’s done, you can run the unit tests in Node using npm test
or node tests/tests.js
. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use grunt test
.
To generate the code coverage report, use grunt cover
.
Feel free to fork if you see possible improvements!
Mathias Bynens |
John-David Dalton |
Punycode.js is available under the MIT license.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 13/30 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
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