{"name":"prefix-matches","version":"0.0.2","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","traverse":"^0.6.6"},"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":"256f81588f33aaaf8f7698ba8e22b40c31dbd65d","bugs":{"url":"https://github.com/rowanoulton/prefix-matches/issues"},"homepage":"https://github.com/rowanoulton/prefix-matches#readme","_id":"prefix-matches@0.0.2","_shasum":"f144e1757558166f0c1523dd0c19400574a09d40","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"rowanoulton","email":"rowan.oulton@gmail.com"},"dist":{"shasum":"f144e1757558166f0c1523dd0c19400574a09d40","tarball":"http://registry-npm.ywwl.com/prefix-matches/download/prefix-matches-0.0.2.tgz","integrity":"sha512-sdmPh6ZrcZ+CaaeeueN4RnaMT1b71D9S+Zqn+fm9UZ4Pzt0dc/C2700MpHWW1/Kj29j07Eih3fL7jUsyqRI3jQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDx1T3+ouw9rJtj9HJAXOrbIi4xqsE4f2iAO4m462vHNwIgY7Nb+74Fc7Y9McvnvxEsTxia6YCEC0TZZE4+z41LXWk="}],"size":2531,"noattachment":false,"key":"/prefix-matches/-/prefix-matches-0.0.2.tgz"},"maintainers":[{"name":"rowanoulton","email":"rowan.oulton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/prefix-matches-0.0.2.tgz_1462159988406_0.31388517934828997"},"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":1462159990615,"_cnpm_publish_time":1462159990615,"dist-tags":{"latest":"1.0.1"}}