{"_id":"@npmcli/name-from-folder","_rev":"4130873","name":"@npmcli/name-from-folder","description":"Get the package name from a folder path","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"time":{"modified":"2026-03-01T18:33:03.000Z","created":"2020-03-29T23:29:03.413Z","4.0.0":"2025-10-22T15:29:53.885Z","3.0.0":"2024-09-24T19:13:10.812Z","2.0.0":"2022-12-13T05:35:23.817Z","1.0.1":"2020-03-29T23:44:27.958Z","1.0.0":"2020-03-29T23:29:03.413Z"},"users":{},"author":{"name":"GitHub Inc."},"repository":{"type":"git","url":"git+https://github.com/npm/name-from-folder.git"},"versions":{"4.0.0":{"name":"@npmcli/name-from-folder","version":"4.0.0","main":"lib/index.js","description":"Get the package name from a folder path","repository":{"type":"git","url":"git+https://github.com/npm/name-from-folder.git"},"author":{"name":"GitHub Inc."},"license":"ISC","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.27.1","tap":"^16.3.2"},"engines":{"node":"^20.17.0 || >=22.9.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.27.1","publish":true},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"gitHead":"2e09b7e1eb12fd33f035923905ab859a9086936b","_id":"@npmcli/name-from-folder@4.0.0","bugs":{"url":"https://github.com/npm/name-from-folder/issues"},"homepage":"https://github.com/npm/name-from-folder#readme","_nodeVersion":"22.20.0","_npmVersion":"11.6.2","dist":{"shasum":"b4d516ae4fab5ed4e8e8032abff3488703fc24a3","size":1476,"noattachment":false,"key":"/@npmcli/name-from-folder/-/@npmcli/name-from-folder-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/name-from-folder/download/@npmcli/name-from-folder-4.0.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a86a275b-6cf6-495d-949d-dbaf9ad7d814"}},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/name-from-folder_4.0.0_1761146993683_0.009450970811423431"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-22T15:29:53.885Z","publish_time":1761146993885,"_source_registry_name":"default","_cnpm_publish_time":1761146993885},"3.0.0":{"name":"@npmcli/name-from-folder","version":"3.0.0","main":"lib/index.js","description":"Get the package name from a folder path","repository":{"type":"git","url":"git+https://github.com/npm/name-from-folder.git"},"author":{"name":"GitHub Inc."},"license":"ISC","scripts":{"test":"tap","snap":"tap","lint":"npm run eslint","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run eslint -- --fix","posttest":"npm run lint","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""},"devDependencies":{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","tap":"^16.3.2"},"engines":{"node":"^18.17.0 || >=20.5.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.23.3","publish":true},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"_id":"@npmcli/name-from-folder@3.0.0","gitHead":"0746b77be041a53c393c8d94b5e70620f205a4dc","bugs":{"url":"https://github.com/npm/name-from-folder/issues"},"homepage":"https://github.com/npm/name-from-folder#readme","_nodeVersion":"22.9.0","_npmVersion":"10.8.3","dist":{"shasum":"ed49b18d16b954149f31240e16630cfec511cd57","size":1477,"noattachment":false,"key":"/@npmcli/name-from-folder/-/@npmcli/name-from-folder-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/name-from-folder/download/@npmcli/name-from-folder-3.0.0.tgz"},"_npmUser":{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/name-from-folder_3.0.0_1727205190601_0.1513681029431626"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-24T19:13:10.812Z","publish_time":1727205190812,"_source_registry_name":"default","_cnpm_publish_time":1727205190812},"2.0.0":{"name":"@npmcli/name-from-folder","version":"2.0.0","main":"lib/index.js","description":"Get the package name from a folder path","repository":{"type":"git","url":"git+https://github.com/npm/name-from-folder.git"},"author":{"name":"GitHub Inc."},"license":"ISC","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.js\"","postlint":"template-oss-check","template-oss-apply":"template-oss-apply --force","lintfix":"npm run lint -- --fix","posttest":"npm run lint"},"devDependencies":{"@npmcli/eslint-config":"^4.0.1","@npmcli/template-oss":"4.11.0","tap":"^16.3.2"},"engines":{"node":"^14.17.0 || ^16.13.0 || >=18.0.0"},"templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.11.0"},"tap":{"nyc-arg":["--exclude","tap-snapshots/**"]},"gitHead":"1892dabe34d849861cddbb9fc5213131e93a688b","bugs":{"url":"https://github.com/npm/name-from-folder/issues"},"homepage":"https://github.com/npm/name-from-folder#readme","_id":"@npmcli/name-from-folder@2.0.0","_nodeVersion":"18.12.1","_npmVersion":"9.2.0","dist":{"shasum":"c44d3a7c6d5c184bb6036f4d5995eee298945815","size":1431,"noattachment":false,"key":"/@npmcli/name-from-folder/-/@npmcli/name-from-folder-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/name-from-folder/download/@npmcli/name-from-folder-2.0.0.tgz"},"_npmUser":{"name":"lukekarrys","email":"luke@lukekarrys.com"},"directories":{},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/name-from-folder_2.0.0_1670909723647_0.2254786259251147"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-13T05:35:42.734Z","publish_time":1670909723817,"_cnpm_publish_time":1670909723817},"1.0.1":{"name":"@npmcli/name-from-folder","version":"1.0.1","description":"Get the package name from a folder path","repository":{"type":"git","url":"git+https://github.com/npm/name-from-folder.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"tap":{"check-coverage":true},"devDependencies":{"tap":"^14.10.7"},"gitHead":"d506f09af3edb0fe83e0a05f986ed660ddd9f1e2","bugs":{"url":"https://github.com/npm/name-from-folder/issues"},"homepage":"https://github.com/npm/name-from-folder#readme","_id":"@npmcli/name-from-folder@1.0.1","_nodeVersion":"13.10.1","_npmVersion":"6.14.4","dist":{"shasum":"77ecd0a4fcb772ba6fe927e2e2e155fbec2e6b1a","size":1273,"noattachment":false,"key":"/@npmcli/name-from-folder/-/@npmcli/name-from-folder-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/name-from-folder/download/@npmcli/name-from-folder-1.0.1.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/name-from-folder_1.0.1_1585525467838_0.45924509270052094"},"_hasShrinkwrap":false,"publish_time":1585525467958,"_cnpm_publish_time":1585525467958},"1.0.0":{"name":"@npmcli/name-from-folder","version":"1.0.0","description":"Get the package name from a folder path","repository":{"type":"git","url":"git+https://github.com/npm/name-from-folder.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"tap":{"check-coverage":true},"devDependencies":{"tap":"^14.10.7"},"gitHead":"e0ac9d112c2fdbfeaf3238383759df4fd7e5e1ed","bugs":{"url":"https://github.com/npm/name-from-folder/issues"},"homepage":"https://github.com/npm/name-from-folder#readme","_id":"@npmcli/name-from-folder@1.0.0","_nodeVersion":"13.10.1","_npmVersion":"6.14.4","dist":{"shasum":"04ae177ff0f586249f77b976b50455c613bd2803","size":1110,"noattachment":false,"key":"/@npmcli/name-from-folder/-/@npmcli/name-from-folder-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/name-from-folder/download/@npmcli/name-from-folder-1.0.0.tgz"},"maintainers":[{"name":"gar","email":""},{"name":"npm-cli-ops","email":""},{"name":"owlstronaut","email":""},{"name":"reggi","email":""},{"name":"saquibkhan","email":""}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/name-from-folder_1.0.0_1585524543294_0.28334082615704714"},"_hasShrinkwrap":false,"publish_time":1585524543413,"_cnpm_publish_time":1585524543413}},"readme":"# @npmcli/name-from-folder\n\nGet the package name from a folder path, including the scope if the\nbasename of the dirname starts with `@`.\n\nFor a path like `/x/y/z/@scope/pkg` it'll return `@scope/pkg`.  If the path\nname is something like `/x/y/z/pkg`, then it'll return `pkg`.\n\n## USAGE\n\n```js\nconst nameFromFolder = require('@npmcli/name-from-folder')\nconst name = nameFromFolder('/some/folder/path')\n```\n","_attachments":{},"homepage":"https://github.com/npm/name-from-folder#readme","bugs":{"url":"https://github.com/npm/name-from-folder/issues"},"license":"ISC"}