{"name":"@oozcitak/uts46","version":"1.0.0","keywords":["uts46","tr46","unicode","idna"],"homepage":"http://github.com/oozcitak/uts46","description":"An implementation of Unicode IDNA Compatibility Processing (UTS 46)","author":{"name":"Ozgur Ozcitak","email":"oozcitak@gmail.com"},"contributors":[],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/oozcitak/uts46.git"},"bugs":{"url":"http://github.com/oozcitak/uts46/issues"},"main":"./lib/index","types":"lib/index.d.ts","engines":{"node":">=20.0"},"dependencies":{"@oozcitak/util":"^10.0.0","punycode":"^2.3.1"},"devDependencies":{"@types/node":"^24.7.0","tsx":"^4.20.6","typescript":"^5.9.3"},"scripts":{"test":"tsc && tsx --test --experimental-test-coverage test/*test.ts","cover":"tsc && tsx --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=./coverage/lcov.info test/*test.ts","publish-public":"tsc && npm run cover && npm publish --access public"},"_id":"@oozcitak/uts46@1.0.0","gitHead":"f482b1e3a6801fdff168417c74f6f14f90d4d7e3","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-9EkWAdQDeLGR/x5pWXHtfJesNfK55QLpsoNIl1CMEfXXbF3AzWsEfV2Cvn8pbY+t8eIxQr3btCEst1k0ZpI4Gw==","shasum":"103109d853211e7b4941840c2d835cef7cfd11f5","tarball":"http://registry-npm.ywwl.com/@oozcitak/uts46/download/@oozcitak/uts46-1.0.0.tgz","fileCount":15,"unpackedSize":1320549,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCSdlWBv1PsYhMAp3vJGm2MvFU4H6rJaeakjdrm2T50FQIhAJh09e/j+n9JzVz31EXPfFsvYtW16D49lVMWnb1HfLPw"}],"size":82516,"noattachment":false,"key":"/@oozcitak/uts46/-/@oozcitak/uts46-1.0.0.tgz"},"_npmUser":{"name":"oozcitak","email":"oozcitak@gmail.com"},"directories":{},"maintainers":[{"name":"oozcitak","email":"oozcitak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/uts46_1.0.0_1764169059175_0.5525850465795867"},"_hasShrinkwrap":false,"readme":"# UTS46\nA Javascript implementation of [Unicode IDNA Compatibility Processing (UTS 46)](http://www.unicode.org/reports/tr46/).\n\n[![License](http://img.shields.io/npm/l/@oozcitak/uts46.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n[![NPM Version](http://img.shields.io/npm/v/@oozcitak/uts46.svg?style=flat-square)](https://www.npmjs.com/package/@oozcitak/uts46)\n\n[![Node.js CI](https://github.com/oozcitak/uts46/workflows/build/badge.svg)](https://github.com/oozcitak/uts46/actions)\n[![Code Coverage](https://codecov.io/gh/oozcitak/uts46/branch/master/graph/badge.svg)](https://codecov.io/gh/oozcitak/uts46)\n\n# Version\nCurrent version implements the standard as of version [24](http://www.unicode.org/reports/tr46/tr46-24.html).\n\n# Documentation\nThe library exports the following functions:\n\n## toASCII(domainName, options)\nConverts a domain name string to ASCII. Returns the converted string or `null` if an\nerror occurs during conversion.\n\n- `domainName` - a domain name string\n- `options` - an object with the following boolean properties:\n  - `useSTD3ASCIIRules` - determines whether to abide by the rules in\n    [STD3](http://www.rfc-editor.org/std/std3.txt). These rules exclude ASCII\n    characters outside the set consisting of A-Z, a-z, 0-9, and U+002D ( - )\n    HYPHEN-MINUS. Defaults to `true`.\n  - `checkHyphens` - determines whether to allow a domain name label to start\n    or end with a U+002D ( - ) HYPHEN-MINUS character and also to contain\n    a hyphen-minus in both its third and fourth characters. Defaults to `true`.\n  - `checkBidi` - determines whether to abide by the rules of\n    [RFC 5893](http://tools.ietf.org/html/rfc5893) for a bidirectional domain\n    name. Defaults to `true`.\n  - `checkJoiners` - determines whether to abide by the rules of\n    [RFC 5892](http://tools.ietf.org/html/rfc5892) ContextJ. Defaults to `true`.\n  - `transitionalProcessing` - determines whether to replace deviation characters\n    in the domain name string. Defaults to `true`.\n  - `verifyDnsLength` - determines whether to apply DNS length restrictions to\n    the domain name string and its labels. Defaults to `true`.\n\n## toUnicode(domainName, options, output)\nConverts a domain name string to Unicode.\n\n- `domainName` - a domain name string\n- `options` - an object with the following boolean properties:\n  - `useSTD3ASCIIRules` - determines whether to abide by the rules in\n    [STD3](http://www.rfc-editor.org/std/std3.txt). These rules exclude ASCII\n    characters outside the set consisting of A-Z, a-z, 0-9, and U+002D ( - )\n    HYPHEN-MINUS. Defaults to `true`.\n  - `checkHyphens` - determines whether to allow a domain name label to start\n    or end with a U+002D ( - ) HYPHEN-MINUS character and also to contain\n    a hyphen-minus in both its third and fourth characters. Defaults to `true`.\n  - `checkBidi` - determines whether to abide by the rules of\n    [RFC 5893](http://tools.ietf.org/html/rfc5893) for a bidirectional domain\n    name. Defaults to `true`.\n  - `checkJoiners` - determines whether to abide by the rules of\n    [RFC 5892](http://tools.ietf.org/html/rfc5892) ContextJ. Defaults to `true`.\n  - `transitionalProcessing` - Determines whether to replace deviation characters\n    in the domain name string. Defaults to `true`.\n- `output` - an object containing a single boolean `error` property that is set on return\n  indicating if any errors were encountered during conversion.\n\n# Examples\n```js\n// toUnicode without transitional processing\ntoUnicode(\"fass.de\", { transitionalProcessing: false }); // \"fass.de\"\ntoUnicode(\"faß.de\", { transitionalProcessing: false }); //\"faß.de\"\ntoUnicode(\"Faß.de\", { transitionalProcessing: false }); // \"faß.de\"\ntoUnicode(\"xn--fa-hia.de\", { transitionalProcessing: false }); // \"faß.de\"\n\n// toASCII with transitional processing\ntoASCII(\"fass.de\"); // \"fass.de\"\ntoASCII(\"faß.de\"); // \"fass.de\"\ntoASCII(\"Faß.de\"); // \"fass.de\"\ntoASCII(\"xn--fa-hia.de\"); // \"xn--fa-hia.de\"\n\n// toASCII without transitional processing'\ntoASCII(\"fass.de\", { transitionalProcessing: false }); // \"fass.de\"\ntoASCII(\"faß.de\", { transitionalProcessing: false }); // \"xn--fa-hia.de\"\ntoASCII(\"Faß.de\", { transitionalProcessing: false }); // \"xn--fa-hia.de\"\ntoASCII(\"xn--fa-hia.de\", { transitionalProcessing: false }); // \"xn--fa-hia.de\"\n```\n","publish_time":1764169059352,"_cnpm_publish_time":1764169059352,"dist-tags":{"latest":"1.0.0"}}