{"name":"unicode-match-property-value-ecmascript","version":"2.1.0","description":"Match a Unicode property or property alias to its canonical property name per the algorithm used for RegExp Unicode property escapes in ECMAScript.","homepage":"https://github.com/mathiasbynens/unicode-match-property-value-ecmascript","main":"index.js","engines":{"node":">=4"},"keywords":["unicode","unicode property values","unicode property value aliases"],"license":"MIT","author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"repository":{"type":"git","url":"git+https://github.com/mathiasbynens/unicode-match-property-value-ecmascript.git"},"bugs":{"url":"https://github.com/mathiasbynens/unicode-match-property-value-ecmascript/issues"},"devDependencies":{"ava":"*","jsesc":"^3.0.2","unicode-property-value-aliases-ecmascript":"^2.1.0"},"scripts":{"build":"node scripts/build.js","test":"ava tests/tests.js"},"gitHead":"1cbc7cd306402150aa37e87c92bef98fe1d54455","_id":"unicode-match-property-value-ecmascript@2.1.0","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==","shasum":"cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0","tarball":"http://registry-npm.ywwl.com/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-2.1.0.tgz","fileCount":5,"unpackedSize":25743,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDepzYmxg0APYzxOY4aweF2bEr3MUm3rt2EyPubBCZ+tgIhAOVdXajX2HQPUPPic+itRJ6lxeeYmSDNLNOlhVyfVYud"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcqe/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4/RAAoYyOtbkstQSLh115Fh0ON7s8Ph1mx8kUTa9v+P/YYOJ5c2TB\r\nPHOKVon9+/YlUv+cz9f3+V84JemOSKwWLaQCIFlIZ8rdSF5X3bHw4ffYov61\r\n076DVXeB1Gr+v0+gbY1Gp6nMIkfuHbMmSsAGthaZNRP49d33VQm/Zl2FKBvI\r\nXrmsv0xSD0Y1xHWi4V424PVZG20fwB24kUmPJUDXfRCRHHp1U64QGFxki5Wv\r\no3HORbxpOnHNQROKG8fY0dII7iHOXCXwvLU+zI8medtnfjZLLFmlbf2bCeW0\r\nvErqx4HulZAtilUy5uiwBKX4lZVUiWoSq2QfHJBSZwP0cd2wauqTr+rS4i1j\r\nazxhnRWy5gCSXK0RVo/mfwbRmjZwiBBo4aDzW8tcFJBG3C9CGwY8Inkrrg/w\r\nF24C5hOjKLzx5uRHimyvi5jtRWEQrcW/Tb56L2UJVKK0pJL8WDr1dQ5XxDPC\r\nH566BxEPr/vDL32Dvpa0OY8V7w39ppKJ8qn0+DQ5K8LN4mDkpJFDbhjftw6u\r\nDOkYenD9VUapPaFm51eQ/8xJwh88/IxYZ8IC+CC17NyRGi/rO8vYottXfbHg\r\nOelR8Rfr6hFzVmuK8RyL7lFSBzyjvXqmr15idfgJ3BNbl+ZSYzVdhEOTkEBL\r\n/FfgNGtiTAvx7tcr9jwCO3bdZNdKTstEyUw=\r\n=gqfF\r\n-----END PGP SIGNATURE-----\r\n","size":5447,"noattachment":false,"key":"/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.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/unicode-match-property-value-ecmascript_2.1.0_1668458431390_0.49777913139322716"},"_hasShrinkwrap":false,"readme":"# unicode-match-property-value-ecmascript [![Build status](https://travis-ci.org/mathiasbynens/unicode-match-property-value-ecmascript.svg?branch=main)](https://travis-ci.org/mathiasbynens/unicode-match-property-value-ecmascript) [![unicode-match-property-value-ecmascript on npm](https://img.shields.io/npm/v/unicode-match-property-value-ecmascript)](https://www.npmjs.com/package/unicode-match-property-value-ecmascript)\n\n_unicode-match-property-value-ecmascript_ matches a given Unicode property value or [property value alias](https://github.com/mathiasbynens/unicode-property-value-aliases) to its canonical property value without applying [loose matching](https://github.com/mathiasbynens/unicode-loose-match), per the algorithm used for [RegExp Unicode property escapes in ECMAScript](https://github.com/tc39/proposal-regexp-unicode-property-escapes). Consider it a strict alternative to loose matching.\n\n## Installation\n\nTo use _unicode-match-property-value-ecmascript_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/):\n\n```bash\n$ npm install unicode-match-property-value-ecmascript\n```\n\nThen, `require` it:\n\n```js\nconst matchPropertyValue = require('unicode-match-property-value-ecmascript');\n```\n\n## API\n\nThis module exports a single function named `matchPropertyValue`.\n\n### `matchPropertyValue(property, value)`\n\nThis function takes a string `property` that is a canonical/unaliased Unicode property name, and a string `value`. It attemps to  match `value` to a canonical Unicode property value for the given property. If there’s a match, it returns the canonical property value. Otherwise, it throws an exception.\n\n```js\n// Find the canonical property value:\nmatchPropertyValue('Script_Extensions', 'Aghb')\n// → 'Caucasian_Albanian'\n\nmatchPropertyValue('Script_Extensions', 'Caucasian_Albanian')\n// → 'Caucasian_Albanian'\n\nmatchPropertyValue('script_extensions', 'Caucasian_Albanian') // Note: incorrect casing.\n// → throws\n\nmatchPropertyValue('Script_Extensions', 'caucasian_albanian') // Note: incorrect casing.\n// → throws\n```\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.\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\n_unicode-match-property-value-ecmascript_ is available under the [MIT](https://mths.be/mit) license.\n","publish_time":1668458431570,"_cnpm_publish_time":1668458431570,"dist-tags":{"latest":"2.2.1"}}