{"_id":"parse-packagejson-name","_rev":"7-88388eb9ae1968da3998aef906a64764","name":"parse-packagejson-name","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"parse-packagejson-name","version":"1.0.0","author":{"url":"http://keithcirkel.co.uk/","name":"Keith Cirkel","email":"npm@keithcirkel.co.uk"},"license":"MIT","_id":"parse-packagejson-name@1.0.0","maintainers":[{"name":"keithamus","email":"npm@keithcirkel.co.uk"}],"dist":{"shasum":"5bce4babbeaec72dacaa770ef07a433a7056db2d","tarball":"https://registry.npmjs.org/parse-packagejson-name/-/parse-packagejson-name-1.0.0.tgz","integrity":"sha512-hZczBTIQR/a7QsCXS0LjWpnjAugMNCEHrL+RDCmi54wi+EiUqVGIYF/1lUNG4MRTg4KG3SfAgSsEfBdB5mjQiQ==","signatures":[{"sig":"MEUCIDAXph8HX9RiZtbUs9T9s3h+9pWvpAka2CSG8ggS6zVTAiEAsyFlGk2iBaGTpDt8Iu/vuAWesmVcze7LFtn6tQ06244=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"5bce4babbeaec72dacaa770ef07a433a7056db2d","gitHead":"c2757894ed4abc5b1c8b5cb4e79e249719ea4be9","scripts":{"test":"mocha test.js"},"_npmUser":{"name":"keithamus","email":"npm@keithcirkel.co.uk"},"_npmVersion":"3.3.6","description":"Parse an npm package name and returns some mildly interesting details about it","_nodeVersion":"5.0.0","devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4"},"directories":{}},"1.0.1":{"name":"parse-packagejson-name","version":"1.0.1","keywords":["package.json","parse","name","scope"],"author":{"url":"http://keithcirkel.co.uk/","name":"Keith Cirkel","email":"npm@keithcirkel.co.uk"},"license":"MIT","_id":"parse-packagejson-name@1.0.1","maintainers":[{"name":"keithamus","email":"npm@keithcirkel.co.uk"}],"homepage":"https://github.com/keithamus/sort-object-keys#readme","bugs":{"url":"https://github.com/keithamus/sort-object-keys/issues"},"dist":{"shasum":"ab5b322cd38c87b4a01620683cca56ad74c006a0","tarball":"https://registry.npmjs.org/parse-packagejson-name/-/parse-packagejson-name-1.0.1.tgz","integrity":"sha512-P1UHO7XCHZWMP8rP/5xLwXcldS/g7SPYcrIuWjGL2KKyUB1yI1QM+jMmMIFTCUqnKGFqGu1XS8/ILUnSM9204g==","signatures":[{"sig":"MEUCIFg1yj+oG6R0Py3u6vai6FOHjSfJ0AUeCZ0HYAnuTfFMAiEA/3SDd8hDa8YOqvyRSqFHEWTxjkYZ62UhJ0fR2E23Kbg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["index.js"],"_shasum":"ab5b322cd38c87b4a01620683cca56ad74c006a0","gitHead":"811a1870fea099c92babc2dafa6038039a1d99d4","scripts":{"test":"mocha test.js","semantic-release":"travis-after-all && semantic-release pre && npm publish && semantic-release post"},"_npmUser":{"name":"keithamus","email":"npm@keithcirkel.co.uk"},"repository":{"url":"git+ssh://git@github.com/keithamus/parse-packagejson-name.git","type":"git"},"_npmVersion":"2.14.9","description":"Parse an npm package name and returns some mildly interesting details about it","_nodeVersion":"0.12.9","devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4","semantic-release":"^4.3.5","travis-after-all":"^1.4.4"},"directories":{}},"1.1.0":{"name":"parse-packagejson-name","version":"1.1.0","keywords":["name","package.json","parse","scope"],"author":{"url":"http://keithcirkel.co.uk/","name":"Keith Cirkel","email":"npm@keithcirkel.co.uk"},"license":"MIT","_id":"parse-packagejson-name@1.1.0","maintainers":[{"name":"keithamus","email":"npm@keithcirkel.co.uk"}],"homepage":"https://github.com/keithamus/sort-object-keys#readme","bugs":{"url":"https://github.com/keithamus/sort-object-keys/issues"},"dist":{"shasum":"2b8e94d08685a0e96f36213314e333a2641f2257","tarball":"https://registry.npmjs.org/parse-packagejson-name/-/parse-packagejson-name-1.1.0.tgz","fileCount":4,"integrity":"sha512-FAl0VlP/AH3kCUKd/tPvtBazuV34Dt6VE4B7QLLyI9/iimfOlCOsCWSB9r/Du/Kt2w3s+2W1QZDkA3dG4zmZqw==","signatures":[{"sig":"MEYCIQCyP+F9ptr7h66kqIQ+QSDoWn5aVynJesvjVcx4H5DpQQIhALfDaIGN7ye4T0VKC5v+ssmd8rpeB6MepA1A0MI5d+00","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/parse-packagejson-name@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3048},"main":"index.js","types":"./index.d.ts","gitHead":"ae3523df5f81ae816a8c4e412f905b080cd053f7","scripts":{"test":"mocha test.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a527de0-8ea2-41b7-a1e8-e84dde6a2ffa"}},"repository":{"url":"git+ssh://git@github.com/keithamus/parse-packagejson-name.git","type":"git"},"_npmVersion":"11.6.4","description":"Parse an npm package name and returns some mildly interesting details about it","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"chai":"^3.4.1","mocha":"^11.7.5"},"_npmOperationalInternal":{"tmp":"tmp/parse-packagejson-name_1.1.0_1765016238834_0.4063215463261203","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"parse-packagejson-name","version":"1.1.1","description":"Parse an npm package name and returns some mildly interesting details about it","keywords":["name","package.json","parse","scope"],"homepage":"https://github.com/keithamus/sort-object-keys#readme","bugs":{"url":"https://github.com/keithamus/sort-object-keys/issues"},"license":"MIT","author":{"name":"Keith Cirkel","email":"npm@keithcirkel.co.uk","url":"http://keithcirkel.co.uk/"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/keithamus/parse-packagejson-name.git"},"scripts":{"test":"mocha test.js"},"devDependencies":{"chai":"^3.4.1","mocha":"^11.7.5"},"gitHead":"2f983e998c0cff4573a2a4a510208808c012176b","types":"./index.d.ts","_id":"parse-packagejson-name@1.1.1","_nodeVersion":"26.5.1","_npmVersion":"12.0.2","dist":{"integrity":"sha512-MBkHgxwvoN1nQ0r7ITjLoCGPdiIiJEsadjtvVNBa6qxEyNThymy+IJulsy0nFBcVsBHDPiDbIzBgk7OSO0BbJQ==","shasum":"c6cbb029233c4f07f34ed52282ac137595512d68","tarball":"https://registry.npmjs.org/parse-packagejson-name/-/parse-packagejson-name-1.1.1.tgz","fileCount":4,"unpackedSize":3049,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/parse-packagejson-name@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAwjkkg4omCa34BNNcOGhNZR74I8UdC64qlxVwVueszkAiBdTOMhrLURNwKaNRls5cLhIZkk8AFZkERq7PnBjfWFbQ=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1a527de0-8ea2-41b7-a1e8-e84dde6a2ffa"}},"directories":{},"maintainers":[{"name":"keithamus","email":"npm@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/parse-packagejson-name_1.1.1_1785573494849_0.5712709304524799"},"_hasShrinkwrap":false}},"time":{"created":"2015-12-07T16:52:52.725Z","modified":"2026-08-01T08:38:15.304Z","1.0.0":"2015-12-07T16:52:52.725Z","1.0.1":"2015-12-14T12:38:17.405Z","1.1.0":"2025-12-06T10:17:18.969Z","1.1.1":"2026-08-01T08:38:15.025Z"},"bugs":{"url":"https://github.com/keithamus/sort-object-keys/issues"},"author":{"name":"Keith Cirkel","email":"npm@keithcirkel.co.uk","url":"http://keithcirkel.co.uk/"},"license":"MIT","homepage":"https://github.com/keithamus/sort-object-keys#readme","keywords":["name","package.json","parse","scope"],"repository":{"type":"git","url":"git+ssh://git@github.com/keithamus/parse-packagejson-name.git"},"description":"Parse an npm package name and returns some mildly interesting details about it","maintainers":[{"name":"keithamus","email":"npm@keithcirkel.co.uk"}],"readme":"# parsePackageJsonName\n\nA very simple package to parse an npm package name and return some mildly interesting details about the name. It gives you back the following properties:\n\n - scope: The scope of the package, e.g. `@foo/blip.blop`'s scope is `'foo'`\n - fullName: The full name of the package, minus the scope, e.g. `@foo/blip.blop`'s fullName is `'blip.blop'`\n - projectName: If there is a `.` character in the fullName, then this can denote the module is part of a larger project, for example `lodash` has modules like `lodash.pluck`. Given the `@foo/blip.blop` example, projectName would be `'blip'`\n - moduleName: Just like above - for our example of `@foo/blip.blop`, moduleName would be `'blop'`.\n\n### Example\n\n```js\nvar parsePackageJsonName = require('parse-packagejson-name');\n\nparsePackageJsonName('@foo/blip.blop').should.deep.equal({\n  scope: 'foo',\n  fullName: 'blip.blop',\n  projectName: 'blip',\n  moduleName: 'blop',\n});\n\nparsePackageJsonName('blip.blop').should.deep.equal({\n  scope: null,\n  fullName: 'blip.blop',\n  projectName: 'blip',\n  moduleName: 'blop',\n});\n\nparsePackageJsonName('blop').should.deep.equal({\n  scope: null,\n  fullName: 'blop',\n  projectName: null,\n  moduleName: 'blop',\n});\n\nparsePackageJsonName(require('lodash.pluck/package.json')).should.deep.equal({\n  scope: null,\n  fullName: 'lodash.pluck',\n  projectName: 'lodash',\n  moduleName: 'pluck',\n});\n```\n","readmeFilename":"README.md"}