{"name":"lookup-deps","description":"Simple API for getting metadata from locally installed npm packages (in `node_modules`).","version":"0.1.1","homepage":"https://github.com/jonschlinkert/lookup-deps","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lookup-deps.git"},"bugs":{"url":"https://github.com/jonschlinkert/lookup-deps/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/lookup-deps/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6","verb-tag-jscomments":">= 0.2.0"},"keywords":["dep","dependencies","dependency","deps","find","graph","lookup","module","modules","node","node-modules","package","packages","pkg","resolve","tree"],"dependencies":{"fs-utils":"^0.5.0","get-value":"^0.2.1","lodash":"^2.4.1","multimatch":"^1.0.0"},"_id":"lookup-deps@0.1.1","_shasum":"00aecd1c9829efc396e2efa9838b4a1f61671f89","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"00aecd1c9829efc396e2efa9838b4a1f61671f89","tarball":"http://registry-npm.ywwl.com/lookup-deps/download/lookup-deps-0.1.1.tgz","integrity":"sha512-Qgj19bu3jHwmpZeCsAElzhE/0PUYrjzosO6r5z6/sHLCw3EtoJN5+OppGhBkQIwFgXkrxVml7Nuwcce2RWcbGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQC53DK8LTlU2Hq6Zxb0X9cXR3VSPRRx1/0MhdyvBKIwYgIfGuih5eymMqkd7F/TwnxVTfBJaX+QW9k6/cmFPwlDeA=="}],"size":6796,"noattachment":false,"key":"/lookup-deps/-/lookup-deps-0.1.1.tgz"},"directories":{},"readme":"# lookup-deps [![NPM version](https://badge.fury.io/js/lookup-deps.svg)](http://badge.fury.io/js/lookup-deps)\n\n> Simple API for getting metadata from locally installed npm packages (in `node_modules`).\n\n## What does it do!?\n\nBuilds a recursive tree of all `dependencies` currently installed in node_modules. Allows you to easily get information from the package.json of any locally installed module.\n\n**Examples:**\n\nGet the version of the specified dependency:\n\n```js\ndeps.get('markdown-utils', 'version');\n//=> '0.1.0'\n```\n\nUse glob patterns to get the specified property from every dependency:\n\n```js\ndeps.get('*', 'homepage')\n\n// returns an object like this:\n{ globby: 'https://github.com/sindresorhus/globby',\n 'is-relative': 'https://github.com/jonschlinkert/is-relative',\n 'is-absolute': 'https://github.com/jonschlinkert/is-absolute', ...}\n```\n\nIf an object is returned with `null` values, this means that the package wasn't found at the given path. e.g. it was symlinked by npm.\n\nTo get around this, you can pass `{findup: true}` to the constructor and [findup-sync] will be used to find the nearest match. This is\ndisabled by default since this is an exception to the rule and it considerably slows down searches.\n\n## Install\n### Install with [npm](npmjs.org):\n\n```bash\nnpm i lookup-deps --save-dev\n```\n\n## Run tests\n\n```bash\nnpm test\n```\n\n## Usage\n\n```js\nvar Deps = require('lookup-deps');\nvar deps = new Deps();\n```\n\n## API\n### [Lookup](index.js#L46)\n\nCreate a new instance of `Lookup`.\n\n* `config` **{Object}**: Optionally pass a default config object instead of `package.json` For now there is no reason to do this.    \n* `options` **{Object}**    \n\n```js\nvar Lookup = require('lookup-deps');\nvar deps = new Lookup();\n```\n\n### [.get](index.js#L120)\n\nGet a value from the cache.\n\n* `name` **{Object}**: The module to get.    \n* `props` **{String}**: Property paths.    \n* `returns`: {Object}  \n\n```js\n// get an entire package.json\ndeps.get('markdown-utils');\n//=> { pkg: { name: 'markdown-utils', version: '0.3.0', ... }\n\n// or, get a specific value\ndeps.get('markdown-utils', 'version');\n//=> '0.3.0'\n```\n\n### [.exists](index.js#L144)\n\nCheck to see if a module exists (or at least is on the cache).\n\n* `name` **{String}**: The name to check.    \n* `returns`: {String}  \n\n```js\ndeps.exists('markdown-utils');\n//=> true\n```\n\n### [.depsKeys](index.js#L215)\n\nGet the keys for `dependencies` for the specified package.\n\n* `config` **{Object|String}**: The name of the module, or package.json config object.    \n* `returns`: {Object}  \n\n```js\ndeps.depsKeys('markdown-utils');\n//=> [ 'is-absolute', 'kind-of', 'relative', ... ]\n```\n\n### [.findPkg](index.js#L284)\n\n* `filepath` **{String}**    \n* `returns`: {String}  \n\nFind a package.json for the given module by `name`, starting\nthe search at the given `cwd`.\n\n### [.tree](index.js#L350)\n\nBuild a dependency tree by recursively reading in package.json files for projects in node_modules.\n\n* `cwd` **{String}**: The root directory to search from.    \n* `returns`: {Object}  \n\n```js\ndeps.tree('./');\n```\n\n### [.filter](index.js#L407)\n\nFilter the entire `cache` object to have only packages with names that match the given glob patterns.\n\n* `patterns` **{String|Array}**: Glob patterns to use for filtering modules.    \n* `keyPatterns` **{String|Array}**: Glob patterns to use for filtering the keys on each object.    \n* `returns` **{Object}**: Filtered object.  \n\nYou may also filter the keys on each object by passing\nadditional glob patterns as a second argument.\n\n```js\ndeps.filter('markdown-*');\n//=> {'markdown-utils': {...}}\n\n// exclude the `readme` key from package.json objects\ndeps.filter('markdown-*', ['*', '!readme']);\n//=> {'markdown-utils': {...}}\n```\n\n### [.getParents](index.js#L436)\n\nReturns an object of all modules that have the given module as a dependency. Glob patterns may be used for filtering.\n\n* `patterns` **{String|Array}**: Glob patterns to use for filtering.    \n* `returns` **{Object}**: Object of parent modules.  \n\n```js\ndeps.getParents('*');\n```\n\n### [.names](index.js#L455)\n\nReturn a list of names of all resolved packages from node_modules that match the given glob patterns. If no pattern is provided the entire list is returned.\n\n* `patterns` **{String|Array}**: Glob patterns to use for filtering.    \n* `returns` **{Array}**: Array of keys.  \n\n```js\ndeps.names('markdown-*');\n//=> ['markdown-utils']\n```\n\n### [.find](index.js#L481)\n\nFind a module or modules using glob patterns, and return an object filtered to have only the specified `props`. Note that `package.json` objects are stored on the `pkg` property for each module.\n\n* `patterns` **{String}**    \n* `props` **{String}**    \n* `returns`: {Object}  \n\nProperties are specified using object paths:\n\n```js\ndeps.find('for-*', 'pkg.repository.url');\n\n// results in:\n// { 'for-own': 'git://github.com/jonschlinkert/for-own.git',\n//   'for-in': 'git://github.com/jonschlinkert/for-in.git' }\n```\n\n### [.lookup](index.js#L506)\n\nA convenience proxy for the `.find()` method to specifically search the `pkg` object of each module on the cache.\n\n* `patterns` **{String}**    \n* `props` **{String}**    \n* `returns`: {Object}  \n\n```js\ndeps.lookup('for-*', 'repository.url');\n\n// results in:\n// { 'for-own': 'git://github.com/jonschlinkert/for-own.git',\n//   'for-in': 'git://github.com/jonschlinkert/for-in.git' }\n```\n\n### [.paths](index.js#L524)\n\nGet the path to a module or modules, relative to the current working directory. Glob patterns may be used.\n\n* `patterns` **{String}**    \n* `returns`: {String}  \n\n```js\ndeps.paths('*');\n```\n\n### [.pkg](index.js#L541)\n\nGet the package.json objects for the given module or modules. Glob patterns may be used.\n\n* `patterns` **{String}**    \n* `returns`: {String}  \n\n```js\ndeps.pkg('markdown-utils');\n```\n\n### [.dependencies](index.js#L559)\n\nGet the `dependencies` for the given modules. Glob patterns may be used.\n\n* `patterns` **{String}**    \n* `returns`: {Object}  \n\n```js\ndeps.dependencies('multi*');\n//=> { multimatch: { 'array-differ': '^1.0.0', ... } }\n```\n\n### [.devDependencies](index.js#L577)\n\nGet the `devDependencies` for the given modules. Glob patterns may be used.\n\n* `patterns` **{String}**    \n* `returns`: {Object}  \n\n```js\ndeps.devDependencies('multi*');\n//=> { multimatch: { 'array-differ': '^1.0.0', ... } }\n```\n\n### [.keywords](index.js#L594)\n\nGet the `keywords` for the given modules.\n\n* `patterns` **{String}**    \n* `returns`: {String}  \n\n```js\ndeps.keywords('multi*');\n//=> { multimatch: [ 'minimatch', 'match', ... ] }\n```\n\n### [.homepage](index.js#L611)\n\nGet the `homepage` for the specified modules.\n\n* `patterns` **{String}**    \n* `returns`: {String}  \n\n```js\ndeps.homepage('markdown-*');\n//=> { 'markdown-utils': 'https://github.com/jonschlinkert/markdown-utils' }\n```\n\n### [.links](index.js#L629)\n\nGet a list of markdown-formatted links, from the `homepage` properties of the specified modules.\n\n* `patterns` **{String}**    \n* `returns`: {String}  \n\n```js\ndeps.links('markdown-*');\n//=> [markdown-utils](https://github.com/jonschlinkert/markdown-utils)\n```\n\n### [.reflinks](index.js#L655)\n\nGet a list of markdown-formatted links, from the `homepage` properties of the specified modules.\n\n* `patterns` **{String}**    \n* `returns`: {String}  \n\n```js\ndeps.reflinks('markdown-*');\n//=> [markdown-utils]: https://github.com/jonschlinkert/markdown-utils\n```\n\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2014-2015 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb](https://github.com/assemble/verb) on February 03, 2015._\n\n[arr-flatten]: https://github.com/jonschlinkert/arr-flatten\n[filter-object]: https://github.com/jonschlinkert/filter-object\n[isobject]: https://github.com/jonschlinkert/isobject\n[deep-filter-object]: https://github.com/jonschlinkert/deep-filter-object\n[arr-map]: https://github.com/jonschlinkert/arr-map\n[array-slice]: https://github.com/jonschlinkert/array-slice\n[extend-shallow]: https://github.com/jonschlinkert/extend-shallow\n[kind-of]: https://github.com/jonschlinkert/kind-of\n[arr-diff]: https://github.com/jonschlinkert/arr-diff\n[for-own]: https://github.com/jonschlinkert/for-own\n[make-iterator]: https://github.com/jonschlinkert/make-iterator\n[arr-filter]: https://github.com/jonschlinkert/arr-filter\n[is-number]: https://github.com/jonschlinkert/is-number\n[randomatic]: https://github.com/jonschlinkert/randomatic\n[repeat-element]: https://github.com/jonschlinkert/repeat-element\n[repeat-string]: https://github.com/jonschlinkert/repeat-string\n[fill-range]: https://github.com/jonschlinkert/fill-range\n[expand-range]: https://github.com/jonschlinkert/expand-range\n[preserve]: https://github.com/jonschlinkert/preserve\n[braces]: https://github.com/jonschlinkert/braces\n[filename-regex]: https://github.com/regexps/filename-regex\n[glob-path-regex]: https://github.com/regexps/glob-path-regex\n[is-glob]: https://github.com/jonschlinkert/is-glob\n[micromatch]: https://github.com/jonschlinkert/micromatch\n[export-files]: https://github.com/jonschlinkert/export-files\n[filter-keys]: https://github.com/jonschlinkert/filter-keys\n[filter-values]: https://github.com/jonschlinkert/filter-values\n[sort-asc]: https://github.com/jonschlinkert/sort-asc\n[sort-desc]: https://github.com/jonschlinkert/sort-desc\n[sort-object]: https://github.com/doowb/sort-object\n[for-in]: https://github.com/jonschlinkert/for-in\n[get-value]: https://github.com/jonschlinkert/get-value\n[look-up]: https://github.com/jonschlinkert/look-up\n[markdown-utils]: https://github.com/jonschlinkert/markdown-utils\n\n\n<!-- deps: helper-reflinks -->","publish_time":1412938155047,"_cnpm_publish_time":1412938155047,"dist-tags":{"latest":"1.0.0"}}