{"name":"npm-name","version":"7.1.1","description":"Check whether a package or organization name is available on npm","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/npm-name.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"},"scripts":{"test":"xo && ava && tsd"},"keywords":["name","available","package","organization","npm","pkg","app","check","taken"],"dependencies":{"got":"^11.8.5","is-name-taken":"^2.0.0","is-scoped":"^3.0.0","is-url-superb":"^6.1.0","lodash.zip":"^4.2.0","org-regex":"^1.0.0","p-map":"^5.5.0","registry-auth-token":"^4.2.2","registry-url":"^6.0.1","validate-npm-package-name":"^3.0.0"},"devDependencies":{"aggregate-error":"^4.0.0","ava":"^3.15.0","tsd":"^0.14.0","unique-string":"^3.0.0","xo":"^0.38.2"},"types":"./index.d.ts","gitHead":"9a84fe9878b270ecdb53b8c0e3cb03b42c070964","bugs":{"url":"https://github.com/sindresorhus/npm-name/issues"},"homepage":"https://github.com/sindresorhus/npm-name#readme","_id":"npm-name@7.1.1","_nodeVersion":"18.17.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-lyOwsFndLoozriMEsaqJ5lXvhCATYOEhDvxlom8TNvB9a/htDXuLgpVhMUOBd9zCewUXCyBXAPxrGr2TK2adgQ==","shasum":"373774cc044b4dab7835e1d02c84f60680f7f748","tarball":"http://registry-npm.ywwl.com/npm-name/download/npm-name-7.1.1.tgz","fileCount":5,"unpackedSize":8971,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrW/hqHJ7wwRtvRdCKtBj5RuoeMqhMvph9me4HWfQ88wIhALn5h3w+8GQsyOJ/sXxJHuPvq8sjp7NZxjf4Lo0fasc8"}],"size":3296,"noattachment":false,"key":"/npm-name/-/npm-name-7.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-name_7.1.1_1697301744705_0.7318801450588559"},"_hasShrinkwrap":false,"readme":"# npm-name\n\n> Check whether a package or organization name is available on npm\n\n## Install\n\n```sh\nnpm install npm-name\n```\n\n## Usage\n\n```js\nimport npmName from 'npm-name';\n\n// Check a package name\nconsole.log(await npmName('chalk'));\n//=> false\n\n// Check an organization name\nconsole.log(await npmName('@ava'));\n//=> false\n\nconsole.log(await npmName('@abc123'));\n//=> true\n\ntry {\n\tawait npmName('_ABC');\n} catch (error) {\n\tconsole.log(error.message);\n\t// Invalid package name: _ABC\n\t// - name cannot start with an underscore\n\t// - name can no longer contain capital letters\n}\n```\n\n## API\n\n### npmName(name, options?)\n\nCheck whether a package/organization name is available (not registered) on npm.\n\nAn organization name should start with `@` and should not be a scoped package.\n\nReturns a `Promise<boolean>` of whether the given name is available.\n\n#### name\n\nType: `string`\n\nThe name to check.\n\n#### options\n\nType: `object`\n\n##### registryUrl\n\nDefault: User's configured npm registry URL.\n\nTHe registry URL to check name availability against.\n\n**Note:** You're unlikely to need this option. Most use-cases are best solved by using the default. You should only use this option if you need to check a package name against a specific registry.\n\n### npmNameMany(names, options?)\n\nCheck whether multiple package/organization names are available (not registered) on npm.\n\nReturns a `Promise<Map>` of name and status.\n\n```js\nimport {npmNameMany} from 'npm-name';\n\nconst result = await npmNameMany(['chalk', '@sindresorhus/is', 'abc123']);\n\nconsole.log(result.get('chalk'));\n//=> false\n\nconsole.log(result.get('@sindresorhus/is'));\n//=> false\n\nconsole.log(result.get('abc123'));\n//=> true\n```\n\n#### names\n\nType: `string[]`\n\nMultiple names to check.\n\n#### options\n\nType: `object`\n\nSame as `npmName()`.\n\n## Related\n\n- [npm-name-cli](https://github.com/sindresorhus/npm-name-cli) - CLI for this module\n","publish_time":1697301745036,"_cnpm_publish_time":1697301745036,"dist-tags":{"latest":"8.1.1"}}