{"name":"unicode-loose-match","version":"2.7.0","keywords":["unicode","loose matching"],"author":{"url":"https://mathiasbynens.be/","name":"Mathias Bynens"},"license":"MIT","_id":"unicode-loose-match@2.7.0","maintainers":[{"name":"mathias","email":"mathias@qiwi.be"}],"homepage":"https://github.com/mathiasbynens/unicode-loose-match","bugs":{"url":"https://github.com/mathiasbynens/unicode-loose-match/issues"},"dist":{"shasum":"3200aaef2143aa4d486192a1e313d788f5b23353","tarball":"http://registry-npm.ywwl.com/unicode-loose-match/download/unicode-loose-match-2.7.0.tgz","fileCount":5,"integrity":"sha512-5soybxlKHKO8P+4b9ITP2CyMYksoCRwpBiT1mPhySpHoRu2B1QNKFle7WQk5YGpIEgiMPYwQ+E4HYLCEvI2HQA==","signatures":[{"sig":"MEUCIAwydBl/gJpcSwlmzEmt8EJOvhkxhKQ2ks6ycJaD8XInAiEAjZzX6sYtLPe2rDnlskJmsFkPKrYKOtRMKXe+P8P9Jgk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91754,"size":17163,"noattachment":false,"key":"/unicode-loose-match/-/unicode-loose-match-2.7.0.tgz"},"main":"index.js","engines":{"node":">=4"},"gitHead":"46e7f16a89ec0313ae382528a4ba3e7c1bc6952c","scripts":{"test":"ava ./tests","build":"node scripts/build.js"},"_npmUser":{"name":"mathias","email":"mathias@qiwi.be"},"repository":{"url":"git+https://github.com/mathiasbynens/unicode-loose-match.git","type":"git"},"_npmVersion":"8.12.1","description":"A JavaScript implementation of Unicode loose matching.","directories":{},"_nodeVersion":"18.5.0","_hasShrinkwrap":false,"devDependencies":{"ava":"*","jsesc":"^3.0.2","@unicode/unicode-15.1.0":"^1.5.2","unicode-property-aliases":"^1.6.2","unicode-property-value-aliases":"^3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/unicode-loose-match_2.7.0_1724674254648_0.5816953336798298","host":"s3://npm-registry-packages"},"readme":"# unicode-loose-match [![unicode-loose-match on npm](https://img.shields.io/npm/v/unicode-loose-match)](https://www.npmjs.com/package/unicode-loose-match)\n\nunicode-loose-match is a JavaScript implementation of [UAX44-LM3](http://unicode.org/reports/tr44/tr44-16.html#Matching_Symbolic), i.e. the loose matching algorithm for symbolic values as defined in the Unicode Standard.\n\nIt’s based on Unicode data and recognizes [property aliases](https://github.com/mathiasbynens/unicode-property-aliases) and [property value aliases](https://github.com/mathiasbynens/unicode-property-value-aliases).\n\n## Installation\n\nTo use _unicode-loose-match_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/):\n\n```bash\n$ npm install unicode-loose-match\n```\n\nThen, `import` it:\n\n```js\nimport matchLoosely from 'unicode-loose-match';\n```\n\n## API\n\nThis module exports a single function named `matchLoosely`.\n\n### `matchLoosely(propertyInput, [valueInput])`\n\nThis function takes two strings `propertyInput` and `valueInput` and applies loose matching on the property-value pair within the list of all Unicode property values. `valueInput` is optional.\n\nThe return value is an object containing containing the canonical property name `property` and the canonical property value name `value`. If an unknown `propertyInput` is given, an exception is thrown.\n\n```js\n// Find the canonical property name and property value name:\nmatchLoosely('blk', 'Arabic_PF_B');\n// → { 'property': 'Block', 'value': 'Arabic_Presentation_Forms_B' }\n\n// Find the canonical property name:\nmatchLoosely('compex');\n// → { 'property': 'Full_Composition_Exclusion' }\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-loose-match_ is available under the [MIT](https://mths.be/mit) license.\n","publish_time":1724674254833,"_cnpm_publish_time":1724674254833,"dist-tags":{"latest":"3.0.0"}}