{"_id":"@ambiere/project-root","_rev":"3-9b303d0b33b8d438a4dfc4d08f45af82","name":"@ambiere/project-root","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@ambiere/project-root","version":"0.1.0","description":"The root of the project.","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/ambiere/project-root.git"},"funding":"https://github.com/sponsors/ambiere","type":"module","exports":{"types":"./src/types/index.d.ts","default":"./src/index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["root","project","path","package","file","resolve","directory"],"author":{"name":"Zidikhery Mchomvu","email":"itsambiere@gmail.com"},"bugs":{"url":"https://github.com/ambiere/project-root/issues"},"homepage":"https://github.com/ambiere/project-root#readme","_id":"@ambiere/project-root@0.1.0","gitHead":"6700574f8a4c15235b96d98c049cec3663066ce8","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-0/YjzT4dVJ94+kMoUJS28q1H3Rk4wSuNCifLY0bbLsLnBWb2zbin1WYzsnixy71EmNtbaMVCjp0w8MpDxDT+4A==","shasum":"34a5d6958ef9d2fc923569629328747d27296077","tarball":"https://registry.npmjs.org/@ambiere/project-root/-/project-root-0.1.0.tgz","fileCount":4,"unpackedSize":3030,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEXaUZ9ulGkfPO0Chz+mAjMKpXxT8mUTjrDl1nf9peuAiEA4fhsXltjDcHEjeL1I7FpE15hDtHK1vK6a0BBPZwhKs4="}]},"_npmUser":{"name":"ambiere","email":"itsambiere@gmail.com"},"directories":{},"maintainers":[{"name":"ambiere","email":"itsambiere@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/project-root_0.1.0_1712305939230_0.4618745368257342"},"_hasShrinkwrap":false},"0.1.1":{"name":"@ambiere/project-root","version":"0.1.1","description":"The root of the project.","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/ambiere/project-root.git"},"funding":"https://github.com/sponsors/ambiere","type":"module","exports":{"types":"./src/types/index.d.ts","default":"./src/index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["root","project","path","package","file","resolve","directory"],"author":{"name":"Zidikhery Mchomvu","email":"itsambiere@gmail.com"},"bugs":{"url":"https://github.com/ambiere/project-root/issues"},"homepage":"https://github.com/ambiere/project-root#readme","_id":"@ambiere/project-root@0.1.1","gitHead":"5f70e6ba52a595be56ebce9728668ca0fe82441d","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-HLxyyJ+fQONJij18qQr1n7BpBzpzOWwIn7jLkrfYUOq13po85dmiMTO06QWF4xHYimJxtJksHvQAdNbhfdzjHw==","shasum":"d39bcb1e3d64b9ee8e5d45a726d9fc2c14658c11","tarball":"https://registry.npmjs.org/@ambiere/project-root/-/project-root-0.1.1.tgz","fileCount":4,"unpackedSize":3020,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBnAy0x7jM8rZMzbn2bUjTxRvuDixlGANTjL+HUVcVlTAiEAyzR4YxiZxlAhjtHVcZM0OxlL3/s6qhOeYTnf9iZvyiI="}]},"_npmUser":{"name":"ambiere","email":"itsambiere@gmail.com"},"directories":{},"maintainers":[{"name":"ambiere","email":"itsambiere@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/project-root_0.1.1_1712308227726_0.17994232432563861"},"_hasShrinkwrap":false},"0.1.2":{"name":"@ambiere/project-root","version":"0.1.2","description":"The root of the project.","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/ambiere/project-root.git"},"funding":"https://github.com/sponsors/ambiere","type":"module","types":"./src/types/index.d.ts","exports":{"types":"./src/types/index.d.ts","default":"./src/index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["root","project","path","package","file","resolve","directory"],"author":{"name":"Zidikhery Mchomvu","email":"itsambiere@gmail.com"},"bugs":{"url":"https://github.com/ambiere/project-root/issues"},"homepage":"https://github.com/ambiere/project-root#readme","_id":"@ambiere/project-root@0.1.2","gitHead":"5f70e6ba52a595be56ebce9728668ca0fe82441d","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Zhg87qCJ/47i+giuawJBIlsdXt6/k2XA1dWwshXuP+68Xv0Q2a9kbjWwFmLz6VM8D0FDyhN36sAt4tEXmgLIBw==","shasum":"1b116e58a160b90c19ea56434b8e0fce3c75ce18","tarball":"https://registry.npmjs.org/@ambiere/project-root/-/project-root-0.1.2.tgz","fileCount":4,"unpackedSize":3057,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8zKnIT4JiwrfRPUCJMIaDKkcIvlltPHOr+2z0MuLKAAiEAqJ5CkvW/AZB52JCEtadM007X1EYUSIu++iFbrqmNJlI="}]},"_npmUser":{"name":"ambiere","email":"itsambiere@gmail.com"},"directories":{},"maintainers":[{"name":"ambiere","email":"itsambiere@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/project-root_0.1.2_1712310565170_0.9069140864977632"},"_hasShrinkwrap":false},"0.1.3":{"name":"@ambiere/project-root","version":"0.1.3","description":"The root of the project.","license":"MIT","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/ambiere/project-root.git"},"funding":"https://github.com/sponsors/ambiere","type":"module","types":"./src/types/index.d.ts","exports":{"types":"./src/types/index.d.ts","default":"./src/index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["root","project","path","package","file","resolve","directory"],"author":{"name":"Zidikhery Mchomvu","email":"itsambiere@gmail.com"},"bugs":{"url":"https://github.com/ambiere/project-root/issues"},"homepage":"https://github.com/ambiere/project-root#readme","_id":"@ambiere/project-root@0.1.3","gitHead":"7cbb093c96cb5f3c02120ebb274ac5b47cd28985","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-PQSaobnDYU+cYz1HUIjh/KOA2jzZKcS//gNbvQoDtlXzS6Wxu+M7rA4L/f0WDlbw/m87Bu6H6V3Jpneoy31HaQ==","shasum":"7744b52c73dcdd8f7854b5d302581509a1631154","tarball":"https://registry.npmjs.org/@ambiere/project-root/-/project-root-0.1.3.tgz","fileCount":5,"unpackedSize":4036,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6XUR4Hs8tk4ddR0St5nslj/HHTOFsNo8Dz4GAtda3UAiEAxHzF1cM93Bt7cozuaeU1Wp0ntGlkYd3M7RmCXkK9T1M="}]},"_npmUser":{"name":"ambiere","email":"itsambiere@gmail.com"},"directories":{},"maintainers":[{"name":"ambiere","email":"itsambiere@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/project-root_0.1.3_1712317426022_0.5777657410965409"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-05T08:32:19.139Z","0.1.0":"2024-04-05T08:32:19.391Z","modified":"2024-04-05T11:43:46.339Z","0.1.1":"2024-04-05T09:10:27.897Z","0.1.2":"2024-04-05T09:49:25.331Z","0.1.3":"2024-04-05T11:43:46.181Z"},"maintainers":[{"name":"ambiere","email":"itsambiere@gmail.com"}],"description":"The root of the project.","homepage":"https://github.com/ambiere/project-root#readme","keywords":["root","project","path","package","file","resolve","directory"],"repository":{"type":"git","url":"git+https://github.com/ambiere/project-root.git"},"author":{"name":"Zidikhery Mchomvu","email":"itsambiere@gmail.com"},"bugs":{"url":"https://github.com/ambiere/project-root/issues"},"license":"MIT","readme":"# project-root\n\n> Tiny and zero dependencies utility, that finds the root of npm project.\n\n[![Release](https://github.com/ambiere/project-root/actions/workflows/main.yml/badge.svg)](https://github.com/ambiere/project-root/actions/workflows/main.yml)\n\n## Install\n\n```bash\nnpm install @ambiere/project-root\n```\n\n## Usage\n\nExample npm project structure:\n\n```txt\n/\n└── root \n   ├── .git\n   ├── package.json\n   └── src\n       ├── types\n       └── index.js\n```\n\nFind the root of the project in `index.js` file:\n\n```js\nimport projectRootDir from \"@ambiere/project-root\"\n\nconst projectRoot = projectRootDir()\nconsole.log(projectRoot) // → /root\n```\n\n## API\n\n### `projectRootDir(dir?)`\n\nReturn the root directory of the npm project or `undefined` if none could be found.\n\n#### dir:\n\nType: `string`\n \nDefault: `process.cwd`\n\nThe directory to start the search.\n\n\n## License\n\n[MIT license][MIT]\n\n[MIT]: https://github.com/ambiere/project-root/blob/main/license\n","readmeFilename":"readme.md"}