{"name":"unicode-loose-match","version":"2.5.0","description":"A JavaScript implementation of Unicode loose matching.","homepage":"https://github.com/mathiasbynens/unicode-loose-match","main":"index.js","engines":{"node":">=4"},"files":["LICENSE-MIT.txt","index.js","data/mappings.js"],"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":{"ava":"*","jsesc":"^2.5.1","unicode-11.0.0":"^0.7.7","unicode-property-aliases":"^1.3.0","unicode-property-value-aliases":"^3.3.0"},"scripts":{"build":"node scripts/build.js","test":"ava ./tests"},"gitHead":"4e0cc8c55af6e9ff33f3d27d7b11dc1b48ab6a59","_id":"unicode-loose-match@2.5.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"mathias","email":"mathias@qiwi.be"},"dist":{"integrity":"sha512-1fDVBUl82GAiFYyhPIcV1Il5RjbU2tHGqG9z1FSyP47e1VHKN+suJOfE1g1n+ivG2IP/u67OkUBTk1bKHKii0w==","shasum":"58b887d1d5f198023651c064026d027361ce657e","tarball":"http://registry-npm.ywwl.com/unicode-loose-match/download/unicode-loose-match-2.5.0.tgz","fileCount":5,"unpackedSize":82184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGMisCRA9TVsSAnZWagAAgSwP/iLwTEUWtzFmtQnUL1OJ\nv+S0q9/pPBIdLCzy+Pv4AujHoEy3VXu9lShW3O9J95QIvQMz8aOtpFDWlgos\nKiav+f6jnROW1C4LSRjdEuX/PMSUHmvC7YN9F1BTmt6WvCXwuQf13Bbj65e5\nBKIQDDKwvJ8K9IhBZI++FndkKRIAkZu7pm9moU2N2B73LmlJvLzKXMzguk2s\nmKSBDQnAjYEMBgQ8ALGBvJnUZ4Yf7YYeQregW1GAfAkkVc+OoaqNRN2SFhVh\njON9LguAaKzK1K37Toun+enEQJs5HPHz42Phn18wiyQq8wZ6+xp51sA56JrS\nxO2aEpalwsHuErvW8u0aPvkezgAQ5FhzdM4hdzdIuRgjSlMOSvmQ0J/5uPoY\nAl2OKl5TXY6J9cTBvT19RpzuunSjqJAPWTNFGQP9Dxa1SyPQjJpgeFyNWDaH\n0j/jfrLt8TP8+pavUrRYQl1w6vBPrGx2eERBcI+otj0PiR7kRIuz6QIwtGmq\nQPbNRxIb+3f9oED7kyvD5rVAwGnGb6HZROT4dnY2DQv64yLeCdwnWP9zMDNo\nw3j4nj3dg57ajvwLBUgNn3vzvRhNjTGAI7fm6lXZUzvSvJHLBIFGeFUV0qxb\nfz0yzC1/WAj1g1frYC5TOct1d8IVh3kfKs3sn7m1HmHM30XzIN82yeym26FU\nYjf0\r\n=81V1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHlia6Hl6W9M+p4XImApSZx0rW5j0r9My4JlCAFeIH0gIhAMXWMSvRsDHqC6dG9LNfuw9vCBYhKc5ecS40T5UxvkuX"}],"size":14844,"noattachment":false,"key":"/unicode-loose-match/-/unicode-loose-match-2.5.0.tgz"},"maintainers":[{"name":"mathias","email":"mathias@qiwi.be"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unicode-loose-match_2.5.0_1528350892240_0.2581863874018069"},"_hasShrinkwrap":false,"readme":"# 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, `require` it:\n\n```js\nconst matchLoosely = require('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## 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":1528350892322,"_cnpm_publish_time":1528350892322,"dist-tags":{"latest":"3.0.0"}}