{"name":"prefix-matches","version":"0.0.9","description":"Find matching keys in a given object, for a given prefix string","main":"prefix.js","directories":{"test":"test"},"dependencies":{"is-object":"^1.0.1","starts-with":"^1.0.2"},"devDependencies":{"ava":"^0.14.0"},"scripts":{"test":"ava -v"},"keywords":["prefix","autocomplete","object"],"repository":{"type":"git","url":"git+https://github.com/rowanoulton/prefix-matches.git"},"author":{"name":"Rowan Oulton","email":"rowan.oulton@gmail.com","url":"http://github.com/rowanoulton"},"license":"MIT","gitHead":"d9977b36167bc1edf9fa8f3c000fabd77c3558ef","bugs":{"url":"https://github.com/rowanoulton/prefix-matches/issues"},"homepage":"https://github.com/rowanoulton/prefix-matches#readme","_id":"prefix-matches@0.0.9","_shasum":"5887019e2b9566b38917f7529b6ce0fc2c72d68c","_from":".","_npmVersion":"2.15.0","_nodeVersion":"0.10.44","_npmUser":{"name":"rowanoulton","email":"rowan.oulton@gmail.com"},"dist":{"shasum":"5887019e2b9566b38917f7529b6ce0fc2c72d68c","tarball":"http://registry-npm.ywwl.com/prefix-matches/download/prefix-matches-0.0.9.tgz","integrity":"sha512-QUvgQPO1wKD1RJ4OsaYkSf8m7j2A1dkjnIclG7cgFZSo76LeyehfLaP1O0O47axoFec4EgAwsvo7y05oQBPp9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE6FawuTR065kZyfPQ9VLkpmoog91ESMnm34S2a+zVwbAiEA7l6ck4lcUK8MHIKTIGqt3lhOAAFAga5D7w8V/dcPeiI="}],"size":2446,"noattachment":false,"key":"/prefix-matches/-/prefix-matches-0.0.9.tgz"},"maintainers":[{"name":"rowanoulton","email":"rowan.oulton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/prefix-matches-0.0.9.tgz_1462312247830_0.7935279654338956"},"readme":"Prefix Matches\n---\n\nFind matching keys in a given object, for a given prefix string\n\n**Warning**: experimental\n\n## Installation\n\n\tnpm i --save prefix-matches\n\nthen, in your scripts:\n\n```js\nconst prefixMatches = require('prefix-matches')\n```\n\n## Example\n\n```js\nconst prefixMatches = require('prefix-matches')\n\n// Resolves simple cases\nprefixMatches('w', {\n\twatch: 'watch things',\n\tbuild: 'build things'\n}) // => [{ watch: 'watch things' }]\n\n// Does not flatten result set\nprefixMatches('w', {\n\twatch: {\n\t\tjs: 'watch javascript',\n\t\tcss: 'watch css'\n\t},\n\tbuild: 'build things'\n}) // => [{ watch: { js: 'watch javascript', css: 'watch css' }}]\n\n// Resolves nested prefixes\nprefixMatches('w.j', {\n\twatch: {\n\t\tjs: 'watch javascript',\n\t\tcss: 'watch css'\n\t},\n\twrite: {\n\t\tjs: 'write javascript'\n\t}\n}) // => [{ 'watch.js': 'watch javascript' }, { 'write.js': 'write javascript' }]\n\n// ... and so on\nprefixMatches('b.f.j', {\n\tbuild: {\n\t\tfrontend: {\n\t\t\tjs: 'build javascript',\n\t\t\tcss: 'build css'\n\t\t}\n\t}\n}) // => [{ 'build.frontend.js': 'build javascript' }]\n```\n\n## Why?\n\nTo attempt better prefixing support for the [package-scripts](https://github.com/kentcdodds/p-s) project.\n\n## Tests\n\nA basic test suite has been authored in [AVA](https://github.com/sindresorhus/ava), used for its terrifying speed. To run it:\n\n\tnpm test\n","publish_time":1462312250479,"_cnpm_publish_time":1462312250479,"dist-tags":{"latest":"1.0.1"}}