{"name":"punycode","version":"2.3.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/mathiasbynens/punycode.js.git"},"bugs":{"url":"https://github.com/mathiasbynens/punycode.js/issues"},"scripts":{"test":"mocha tests","build":"node scripts/prepublish.js"},"devDependencies":{"codecov":"^1.0.1","istanbul":"^0.4.1","mocha":"^10.2.0"},"jspm":{"map":{"./punycode.js":{"node":"@node/punycode"}}},"gitHead":"44e6200b96c186ebc5de72dcce2bcdfe8a32bfbc","_id":"punycode@2.3.0","_nodeVersion":"14.21.2","_npmVersion":"6.14.17","dist":{"integrity":"sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==","shasum":"f67fa67c94da8f4d0cfff981aee4118064199b8f","tarball":"http://registry-npm.ywwl.com/punycode/download/punycode-2.3.0.tgz","fileCount":5,"unpackedSize":32931,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7etdrakClReF2eotN7CploeiUvyNk3JG2EwoHyp8INAiAXV2SXP/IKaluu8vQ0Y58UA4zHNTJXqSTAaf1tN3LCvA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyYSnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgOA/+NTfKcCQhRUufecHdwepK2L1WkMZ/I3oTQMTT+1pjBURKI352\r\n0BC2iC7CK5V60JI0KXxDvql+zD/HvAg06gKs9jbUstDshIrbjoESPy3+Fd3c\r\n058ZMX8+YCtA6LiGpsFZWX7gcCArpzj+l1LQidy3Mvep99M3xpOoXDcb/Rjl\r\nnY7hZQjN9Pd2WvMQIWWEeirGkXzAQ+wM5ASuTmqnNr8qxNlJ0uNQhFK1l0+U\r\n4P+1tSCDKUpVv1OTQFLzD39rd7lIOu1zfzth68i/ustADPrWHwU48EgGfQsQ\r\n97gKduBk3jN7ZRfj5AN1v59Y6XXtmLF4K4qsabbdzEz5hsw7z2Hr01udxkjL\r\nlw6wfBn7C0Y89PL3qH0ALhSS/4IL1DXUMfbRJcbaF3/MkcnglcH31EElmrld\r\n1THcl4dTrqe/GuDePY5LSV4oO/zrvdA3eNOUPq46K2RuDloXFNyp6iafsqUK\r\n2VLKbohIhTyu5ooRp7rC22JSi0JKRrC3GI/C7BJGlS40fcfgy/ogFpZ49trq\r\n2WxCL3iXn+gJU97I2yyNw3kFtQ183p5goXcXpgbDtkP/3taAP5pPz35PqnwK\r\n1vueCRcH0lJAypULbQj0+0EsLJlEV9z4nZ7+TIBwyR3cBQAwD37nGrwhBdto\r\nEV7m5YgRguo6aQYCSQLsDS+JQAUyxxaZi2c=\r\n=41yH\r\n-----END PGP SIGNATURE-----\r\n","size":7380,"noattachment":false,"key":"/punycode/-/punycode-2.3.0.tgz"},"_npmUser":{"name":"google-wombot","email":"node-team-npm+wombot@google.com"},"directories":{},"maintainers":[{"name":"mathias","email":"mathias@qiwi.be"},{"name":"google-wombot","email":"node-team-npm+wombot@google.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/punycode_2.3.0_1674151079389_0.310718101811883"},"_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":1674151079553,"_cnpm_publish_time":1674151079553,"dist-tags":{"latest":"2.3.1"}}