{"name":"unicode-loose-match","version":"3.0.0","description":"A JavaScript implementation of Unicode loose matching.","homepage":"https://github.com/mathiasbynens/unicode-loose-match","main":"index.mjs","engines":{"node":">=4"},"keywords":["unicode","loose matching"],"license":"MIT","author":{"name":"Mathias Bynens","url":"https://mathiasbynens.be/"},"repository":{"type":"git","url":"git+https://github.com/mathiasbynens/unicode-loose-match.git"},"bugs":{"url":"https://github.com/mathiasbynens/unicode-loose-match/issues"},"devDependencies":{"@unicode/unicode-17.0.0":"^1.6.17","jsesc":"^3.1.0","unicode-property-aliases":"^3.0.0","unicode-property-value-aliases":"^4.0.0"},"scripts":{"build":"node scripts/build.mjs","test":"node tests/tests.mjs"},"_id":"unicode-loose-match@3.0.0","gitHead":"5c2728d7ca2a285642e01399cdad45a7efe03bcc","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-I+WwO0k33AbL3IRKJaS+xGR7kWpiIkUB33TltSZaimW0CxGnj3udUwWobS3vafjxEZj4SbUAqysfNwa2QYcGtQ==","shasum":"4eaa6195b40c6cc15921d0374747d8bc06b74fb3","tarball":"http://registry-npm.ywwl.com/unicode-loose-match/download/unicode-loose-match-3.0.0.tgz","fileCount":5,"unpackedSize":92270,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAYwwTnu262e13LeMZyNlhY4R26cb1DgtQ1VI//6yYpyAiEA7N2UWcsz/BwVF8tVMpy1CZre5wW+CpG+sqN0wdCva7M="}],"size":17924,"noattachment":false,"key":"/unicode-loose-match/-/unicode-loose-match-3.0.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-npm-production","tmp":"tmp/unicode-loose-match_3.0.0_1787750081881_0.9515319257390706"},"_hasShrinkwrap":false,"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":1787750082022,"_cnpm_publish_time":1787750082022,"dist-tags":{"latest":"3.0.0"}}