{"name":"prefix-matches","version":"0.0.5","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":"35efc77ff444ce62aaa17982f47a9334f4c58675","bugs":{"url":"https://github.com/rowanoulton/prefix-matches/issues"},"homepage":"https://github.com/rowanoulton/prefix-matches#readme","_id":"prefix-matches@0.0.5","_shasum":"1d592913782b50140a3fab4a1fede4f37ccaa7f6","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"rowanoulton","email":"rowan.oulton@gmail.com"},"dist":{"shasum":"1d592913782b50140a3fab4a1fede4f37ccaa7f6","tarball":"http://registry-npm.ywwl.com/prefix-matches/download/prefix-matches-0.0.5.tgz","integrity":"sha512-3hrqqo/eP6pvyMBU8VdHYYFuh3oSGVdDYIFZwoCyLM8XC2qS8BjOf9yCHVJ4eIU9bRkki/GkBZ8HzZE2muw/SQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCV9vxVtNO+F95c9DiGB+uh64NicmtC9BOY/30lxUNqhgIgTRkPXEAv3VRV5MfWpq/lKiShO488mqrs83VSh+Ilmqk="}],"size":2417,"noattachment":false,"key":"/prefix-matches/-/prefix-matches-0.0.5.tgz"},"maintainers":[{"name":"rowanoulton","email":"rowan.oulton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/prefix-matches-0.0.5.tgz_1462170198819_0.30811322131194174"},"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":1462170199243,"_cnpm_publish_time":1462170199243,"dist-tags":{"latest":"1.0.1"}}