{"name":"prefix-matches","version":"0.0.8","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":"e19070cf0116feaee063bf866460c851a21dd5d4","bugs":{"url":"https://github.com/rowanoulton/prefix-matches/issues"},"homepage":"https://github.com/rowanoulton/prefix-matches#readme","_id":"prefix-matches@0.0.8","_shasum":"82abe609694a89c98086bab89dcffd7156005d08","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"rowanoulton","email":"rowan.oulton@gmail.com"},"dist":{"shasum":"82abe609694a89c98086bab89dcffd7156005d08","tarball":"http://registry-npm.ywwl.com/prefix-matches/download/prefix-matches-0.0.8.tgz","integrity":"sha512-2zfn8XX7HbfmtUPTLD8u5q6QKmvXEpGrVoqbM4Ajvs790lS8D5212U2dWNOHYBhFmXgWssC/9qPEmkfbw81xcQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKAjfFBNMop734vXHMcuO2P8MUQK8bFEpULPwfkCNKxgIhAK0p/r2y8uJ9dWaYDK+yKuqoZ0ARnMTiXhdV6Vplj02d"}],"size":2441,"noattachment":false,"key":"/prefix-matches/-/prefix-matches-0.0.8.tgz"},"maintainers":[{"name":"rowanoulton","email":"rowan.oulton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/prefix-matches-0.0.8.tgz_1462311131994_0.19452705513685942"},"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":1462311132443,"_cnpm_publish_time":1462311132443,"dist-tags":{"latest":"1.0.1"}}