{"name":"find-npm-prefix","version":"1.0.1","keywords":[],"author":{"url":"http://re-becca.org/","name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","_id":"find-npm-prefix@1.0.1","maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"homepage":"https://github.com/npm/find-npm-prefix#readme","bugs":{"url":"https://github.com/npm/find-npm-prefix/issues"},"dist":{"shasum":"af0faa74e19294b3c8634bae0e91017bb5adfac2","tarball":"http://registry-npm.ywwl.com/find-npm-prefix/download/find-npm-prefix-1.0.1.tgz","integrity":"sha512-I9R7ZnsjlKRvXBJjA1PE4wAkSc24YChoomWdEPTZgeB4DHxf87OutNGV5McFj6WwPghH97nZRejH58XvY6ga6Q==","signatures":[{"sig":"MEYCIQDefB1aEedeCIzDQUarnbOUVGefQynVIX7q5zlFLBxNkgIhANHrYiul5kygZoAU/gsojzGLUEwA5X3FTiDWln7BmVad","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2570,"noattachment":false,"key":"/find-npm-prefix/-/find-npm-prefix-1.0.1.tgz"},"main":"find-prefix.js","gitHead":"4b04e19db1708984b91d00da7d77b2a12f27e5f5","scripts":{"test":"standard && tap --100 test"},"_npmUser":{"name":"iarna","email":"me@re-becca.org"},"deprecated":"This package is no longer supported.","repository":{"url":"git+https://github.com/npm/find-npm-prefix.git","type":"git"},"_npmVersion":"5.5.1","description":"Find the npm project directory associated with for a given directory","directories":{"test":"test"},"_nodeVersion":"4.8.4","dependencies":{},"devDependencies":{"tap":"^10.7.3","standard":"^10.0.3","require-inject":"^1.4.2"},"_npmOperationalInternal":{"tmp":"tmp/find-npm-prefix-1.0.1.tgz_1510149299099_0.07040145457722247","host":"s3://npm-registry-packages"},"readme":"# find-npm-prefix\n\nFind the npm project directory associated with for a given directory\n\n## USAGE\n\n```\nconst findPrefix = require('find-npm-prefix')\n\nfindPrefix(process.cwd).then(prefix => {\n  …\n})\n```\n\n## findPrefix(dir) → Promise(prefix)\n\nThis computes the npm prefix, that is, the directory that npm adds and\nremoves modules from for a given path. \n\nIt takes a directory as an argument and returns a promise of the associated\nprefix directory.\n\n## Algorithm\n\n1. If the directory is a `node_modules` folder, scan up the tree till you find a non-`node_modules` directory and return that.\n2. Else, look for the first parent directory that contains a `node_modules` or a `package.json`\n  1. If one is found, that's the prefix.\n  2. If none are found, return the original directory we were given\n","publish_time":1510149299973,"_cnpm_publish_time":1510149299973,"dist-tags":{"latest":"1.0.2"}}