{"name":"punycode","version":"2.2.0","description":"A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.","homepage":"https://mths.be/punycode","main":"punycode.js","jsnext:main":"punycode.es6.js","module":"punycode.es6.js","engines":{"node":">=6"},"keywords":["punycode","unicode","idn","idna","dns","url","domain"],"license":"MIT","author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"contributors":[{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"}],"repository":{"type":"git","url":"git+https://github.com/bestiejs/punycode.js.git"},"bugs":{"url":"https://github.com/bestiejs/punycode.js/issues"},"scripts":{"test":"mocha tests","prepublish":"node scripts/prepublish.js"},"devDependencies":{"codecov":"^1.0.1","istanbul":"^0.4.1","mocha":"^2.5.3"},"jspm":{"map":{"./punycode.js":{"node":"@node/punycode"}}},"gitHead":"bff3e35710e8e6b21983da388b6ad642462e60f7","_id":"punycode@2.2.0","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-LN6QV1IJ9ZhxWTNdktaPClrNfp8xdSAYS0Zk2ddX7XsXZAxckMHPCBcHRo0cTcEIgYPRiGEkmji3Idkh2yFtYw==","shasum":"2092cc57cd2582c38e4e7e8bb869dc8d3148bc74","tarball":"http://registry-npm.ywwl.com/punycode/download/punycode-2.2.0.tgz","fileCount":5,"unpackedSize":32776,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIP6Xm9mVsKhWwuUkNOwtc5pc/Av7ddxyExcEtsmu6agIhAK3KDFLU/cDgSMbTHdBIc3UORTZ9ZouNqt8+X+ZYp/aS"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvWqlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocZA/+O/UPiSnw5F69q/vUnwACizMjqUr4Pf3JGsicH6GYzJlozg3Z\r\ned6DOjbc7HGyQBWWqq5dCXRZ18SPdwMV9378ASAA2XBZtfh2UbmdhRTNd82P\r\n/VKcIQjoamlulp8nJ8pV7LSFlpRVaE8auDTXIj0l/8PReZz0q7ysgpFMyTel\r\n/6NGAMnZ2v6e7vDJLgQY1xQRUxzBlPWnbRJue+O1DpPrySm/46tfmr0z98Bf\r\nH+XjXYbkdOb3KuL0IWjz2iugo72+KzHr7z/eTzLlix5h1aK08eJ3VA+mG+zA\r\n47O4/IDIkZSGh6FKlSCVVhpbFdwKv7+C1PTFWHnDo6OpFrfyYvBBLLiuIHyI\r\nlMwjXxfusSeaxXz3zew7kNKOgkkRIWYeypk8R+FtceEsqdDbk8xaSE/TVWCK\r\nf5Earx4ow0bvLlo+kKj3PGTcJfV6jHUJxP+r4rudNq0FBnkWsDibIeAbUcYm\r\nqp1x5f5ImZI8ubL/c9ikVU5uba222r0Kg8/dGU8C29U0bHF5/9StWAMBPrTH\r\ns5gMSG3P+sy+1otCLTQeS+Rks1jthE2FxoGTpNhvGy5Aab0kMQ5sN+VxMqzy\r\nrFShr/BRCX3Wfr48vZVGI7CB+j7lSxyRY/UzaoEWyjxckupFlDlugnPvNHkM\r\n4tGrDTolKKNtcKnbED63FB+g9J5EcgSkSHc=\r\n=O3hv\r\n-----END PGP SIGNATURE-----\r\n","size":7338,"noattachment":false,"key":"/punycode/-/punycode-2.2.0.tgz"},"_npmUser":{"name":"mathias","email":"mathias@qiwi.be"},"directories":{},"maintainers":[{"name":"reconbot","email":"wizard@roborooter.com"},{"name":"mathias","email":"mathias@qiwi.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/punycode_2.2.0_1673357989209_0.2288738528869998"},"_hasShrinkwrap":false,"readme":"# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode)\n\nPunycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891).\n\nThis JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:\n\n* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C)\n* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)\n* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)\n* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)\n* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))\n\nThis project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated).\n\nThis project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1).\n\n## Installation\n\nVia [npm](https://www.npmjs.com/):\n\n```bash\nnpm install punycode --save\n```\n\nIn [Node.js](https://nodejs.org/):\n\n> ⚠️ Note that userland modules don't hide core modules.\n> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`.\n> Use `require('punycode/')` to import userland modules rather than core modules.\n\n```js\nconst punycode = require('punycode/');\n```\n\n## API\n\n### `punycode.decode(string)`\n\nConverts a Punycode string of ASCII symbols to a string of Unicode symbols.\n\n```js\n// decode domain name parts\npunycode.decode('maana-pta'); // 'mañana'\npunycode.decode('--dqo34k'); // '☃-⌘'\n```\n\n### `punycode.encode(string)`\n\nConverts a string of Unicode symbols to a Punycode string of ASCII symbols.\n\n```js\n// encode domain name parts\npunycode.encode('mañana'); // 'maana-pta'\npunycode.encode('☃-⌘'); // '--dqo34k'\n```\n\n### `punycode.toUnicode(input)`\n\nConverts 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.\n\n```js\n// decode domain names\npunycode.toUnicode('xn--maana-pta.com');\n// → 'mañana.com'\npunycode.toUnicode('xn----dqo34k.com');\n// → '☃-⌘.com'\n\n// decode email addresses\npunycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq');\n// → 'джумла@джpумлатест.bрфa'\n```\n\n### `punycode.toASCII(input)`\n\nConverts 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.\n\n```js\n// encode domain names\npunycode.toASCII('mañana.com');\n// → 'xn--maana-pta.com'\npunycode.toASCII('☃-⌘.com');\n// → 'xn----dqo34k.com'\n\n// encode email addresses\npunycode.toASCII('джумла@джpумлатест.bрфa');\n// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'\n```\n\n### `punycode.ucs2`\n\n#### `punycode.ucs2.decode(string)`\n\nCreates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), 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.\n\n```js\npunycode.ucs2.decode('abc');\n// → [0x61, 0x62, 0x63]\n// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:\npunycode.ucs2.decode('\\uD834\\uDF06');\n// → [0x1D306]\n```\n\n#### `punycode.ucs2.encode(codePoints)`\n\nCreates a string based on an array of numeric code point values.\n\n```js\npunycode.ucs2.encode([0x61, 0x62, 0x63]);\n// → 'abc'\npunycode.ucs2.encode([0x1D306]);\n// → '\\uD834\\uDF06'\n```\n\n### `punycode.version`\n\nA string representing the current Punycode.js version number.\n\n## For maintainers\n\n### How to publish a new release\n\n1. On the `main` branch, bump the version number in `package.json`:\n\n    ```sh\n    npm version patch -m 'Release v%s'\n    ```\n\n    Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).\n\n    Note that this produces a Git commit + tag.\n\n1. Push the release commit and tag:\n\n    ```sh\n    git push && git push --tags\n    ```\n\n    Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names.\n\n## Author\n\n| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|\n| [Mathias Bynens](https://mathiasbynens.be/) |\n\n## License\n\nPunycode.js is available under the [MIT](https://mths.be/mit) license.\n","publish_time":1673357989392,"_cnpm_publish_time":1673357989392,"dist-tags":{"latest":"2.3.1"}}