{"_id":"pkg-dir","_rev":"3818707","name":"pkg-dir","description":"Find the root directory of a Node.js project or npm package","dist-tags":{"latest":"9.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2025-06-11T09:56:43.000Z","created":"2015-09-01T07:59:42.497Z","9.0.0":"2025-06-05T18:33:38.380Z","8.0.0":"2023-11-03T20:02:47.479Z","7.0.0":"2022-08-16T17:52:18.743Z","6.0.1":"2021-10-06T05:27:37.375Z","6.0.0":"2021-10-02T05:55:52.486Z","5.0.0":"2020-10-16T14:55:24.632Z","4.2.0":"2019-05-21T09:35:48.505Z","4.1.0":"2019-04-05T06:33:59.286Z","4.0.0":"2019-03-12T08:53:41.396Z","3.0.0":"2018-06-18T11:43:02.957Z","2.0.0":"2017-05-04T15:39:08.692Z","1.0.0":"2015-09-01T07:59:42.497Z"},"users":{"recursion_excursion":true,"ahmed-dinar":true,"rocket0191":true,"hugojosefson":true,"alexreg90":true,"alexreg":true,"drewigg":true,"jonnypickard":true,"dwqs":true},"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/pkg-dir.git","type":"git"},"versions":{"9.0.0":{"name":"pkg-dir","version":"9.0.0","keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"pkg-dir@9.0.0","maintainers":[{"name":"sindresorhus","email":""}],"homepage":"https://github.com/sindresorhus/pkg-dir#readme","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"dist":{"shasum":"79d0ca53023fa93f848ba960d75df4476e1fbb1f","size":2044,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-9.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-9.0.0.tgz"},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"fe0b0fbe45a2b3bd92961cbc586d8fde90e58e01","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/pkg-dir.git","type":"git"},"_npmVersion":"10.9.2","description":"Find the root directory of a Node.js project or npm package","directories":{},"_nodeVersion":"20.19.1","dependencies":{"find-up-simple":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^5.3.1","tsd":"^0.29.0","tempy":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pkg-dir_9.0.0_1749148418202_0.4057696963948574","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to `package-directory`.","_cnpmcore_publish_time":"2025-06-05T18:33:38.380Z","publish_time":1749148418380,"_source_registry_name":"default","_cnpm_publish_time":1749148418380},"8.0.0":{"name":"pkg-dir","version":"8.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"dependencies":{"find-up-simple":"^1.0.0"},"devDependencies":{"ava":"^5.3.1","tempy":"^3.1.0","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"fe0b0fbe45a2b3bd92961cbc586d8fde90e58e01","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@8.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"shasum":"8f3de8ba83d46b72a05c80bfd4e579f060fa91e2","size":2014,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-8.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-8.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_8.0.0_1699041767277_0.41695641745763456"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-03T20:02:47.479Z","publish_time":1699041767479,"_source_registry_name":"default","_cnpm_publish_time":1699041767479},"7.0.0":{"name":"pkg-dir","version":"7.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"dependencies":{"find-up":"^6.3.0"},"devDependencies":{"ava":"^4.3.1","tempy":"^3.0.0","tsd":"^0.22.0","typescript":"^4.7.4","xo":"^0.51.0"},"types":"./index.d.ts","gitHead":"7dfd36be6a92788c1b5ee901ff13335fa7523342","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@7.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.3.2","dist":{"shasum":"8f0c08d6df4476756c5ff29b3282d0bab7517d11","size":2246,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_7.0.0_1660672338547_0.3448763788914968"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-16T17:52:27.996Z","publish_time":1660672338743,"_cnpm_publish_time":1660672338743},"6.0.1":{"name":"pkg-dir","version":"6.0.1","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"dependencies":{"find-up":"^6.1.0"},"devDependencies":{"ava":"^3.15.0","tempy":"^2.0.0","tsd":"^0.17.0","typescript":"^4.4.3","xo":"^0.44.0"},"gitHead":"7fac1fab1fd7eca9842f1bab8d7bf9ca1210f943","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@6.0.1","_nodeVersion":"16.10.0","_npmVersion":"7.20.3","dist":{"shasum":"8ec964cecaef98a2bdb9c164733f90a5bcd2352d","size":2257,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-6.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-6.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_6.0.1_1633498057211_0.02612335675989219"},"_hasShrinkwrap":false,"publish_time":1633498057375,"_cnpm_publish_time":1633498057375},"6.0.0":{"name":"pkg-dir","version":"6.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"dependencies":{"find-up":"^6.1.0"},"devDependencies":{"ava":"^3.15.0","tempy":"^2.0.0","tsd":"^0.17.0","typescript":"^4.4.3","xo":"^0.44.0"},"gitHead":"a1006dbd2133b0b21a4fcd90cba12c73cc0c1c6a","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@6.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.20.3","dist":{"shasum":"f78318fe7bd9f1b2915402d6b9e0b90ab45daa8d","size":2252,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_6.0.0_1633154152273_0.9866145156184172"},"_hasShrinkwrap":false,"publish_time":1633154152486,"_cnpm_publish_time":1633154152486},"5.0.0":{"name":"pkg-dir","version":"5.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^5.0.0"},"devDependencies":{"ava":"^2.4.0","tempy":"^1.0.0","tsd":"^0.13.1","xo":"^0.33.1"},"gitHead":"db14a380461b9dcce58bb3845df7d463ffd67628","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@5.0.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a02d6aebe6ba133a928f74aec20bafdfe6b8e760","size":2273,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-5.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_5.0.0_1602860124497_0.1466003740553623"},"_hasShrinkwrap":false,"publish_time":1602860124632,"_cnpm_publish_time":1602860124632},"4.2.0":{"name":"pkg-dir","version":"4.2.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^4.0.0"},"devDependencies":{"ava":"^1.4.1","tempy":"^0.3.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"e25e5342c5ec425bb4a2c93787a880c29cbf0a49","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@4.2.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f099133df7ede422e81d1d8448270eeb3e4261f3","size":2115,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-4.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-4.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_4.2.0_1558431348399_0.7942128019820929"},"_hasShrinkwrap":false,"publish_time":1558431348505,"_cnpm_publish_time":1558431348505},"4.1.0":{"name":"pkg-dir","version":"4.1.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"abe3546fab603463012234bfed768243a074e8d1","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@4.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"aaeb91c0d3b9c4f74a44ad849f4de34781ae01de","size":2102,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-4.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_4.1.0_1554446039149_0.43123501399168696"},"_hasShrinkwrap":false,"publish_time":1554446039286,"_cnpm_publish_time":1554446039286},"4.0.0":{"name":"pkg-dir","version":"4.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^3.0.0"},"devDependencies":{"ava":"^1.3.1","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"2a72e4ece93b2443a2827aeae87f4995bb9e2977","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@4.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1c505f82509ec0165a1fa530892585852e85ce9e","size":1994,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_4.0.0_1552380821273_0.15593856451506727"},"_hasShrinkwrap":false,"publish_time":1552380821396,"_cnpm_publish_time":1552380821396},"3.0.0":{"name":"pkg-dir","version":"3.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"bf7429aa96375d76455826a333f1f7f4da150805","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"2749020f239ed990881b1f71210d51eb6523bea3","size":1826,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-dir_3.0.0_1529322182903_0.9901723746601805"},"_hasShrinkwrap":false,"publish_time":1529322182957,"_cnpm_publish_time":1529322182957},"2.0.0":{"name":"pkg-dir","version":"2.0.0","description":"Find the root directory of a Node.js project or npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^2.1.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"c18df2945cd928787f3290042a6c69352b4e13a5","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","_id":"pkg-dir@2.0.0","_shasum":"f6d5d1109e19d63edf428e0bd57e12777615334b","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f6d5d1109e19d63edf428e0bd57e12777615334b","size":1848,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pkg-dir-2.0.0.tgz_1493912348467_0.855934705818072"},"directories":{},"publish_time":1493912348692,"_hasShrinkwrap":false,"_cnpm_publish_time":1493912348692},"1.0.0":{"name":"pkg-dir","version":"1.0.0","description":"Find the root directory of a npm package","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/pkg-dir"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["package","json","root","npm","entry","find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"a06a60b1a2cddf2f84912221477311327398da01","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"homepage":"https://github.com/sindresorhus/pkg-dir","_id":"pkg-dir@1.0.0","_shasum":"7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4","size":1822,"noattachment":false,"key":"/pkg-dir/-/pkg-dir-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-dir/download/pkg-dir-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1441094382497,"_cnpm_publish_time":1441094382497,"_hasShrinkwrap":false}},"readme":"# pkg-dir\n\n> Find the root directory of a Node.js project or npm package\n\n## Install\n\n```sh\nnpm install pkg-dir\n```\n\n## Usage\n\n```\n/\n└── Users\n    └── sindresorhus\n        └── foo\n            ├── package.json\n            └── bar\n                ├── baz\n                └── example.js\n```\n\n```js\n// example.js\nimport {packageDirectory} from 'pkg-dir';\n\nconsole.log(await packageDirectory());\n//=> '/Users/sindresorhus/foo'\n```\n\n## API\n\n### packageDirectory(option?)\n\nReturns a `Promise` for either the project root path or `undefined` if it could not be found.\n\n### packageDirectorySync(options?)\n\nReturns the project root path or `undefined` if it could not be found.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nThe directory to start searching from.\n\n## Related\n\n- [pkg-dir-cli](https://github.com/sindresorhus/pkg-dir-cli) - CLI for this module\n- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file\n- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories\n","_attachments":{},"homepage":"https://github.com/sindresorhus/pkg-dir#readme","bugs":{"url":"https://github.com/sindresorhus/pkg-dir/issues"},"license":"MIT"}