{"name":"npm-name","version":"1.2.0","description":"Check whether a package name is available on npm","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/npm-name"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bin":{"npm-name":"cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha --timeout 20000"},"files":["index.js","cli.js"],"keywords":["cli-app","cli","bin","app","npm","package","pkg","name","check","available"],"dependencies":{"got":"^5.0.0","log-symbols":"^1.0.0","meow":"^3.3.0","registry-url":"^3.0.0"},"devDependencies":{"mocha":"*"},"gitHead":"60eb4b9ef28c697c06aac1c85b64e9128f48456b","bugs":{"url":"https://github.com/sindresorhus/npm-name/issues"},"homepage":"https://github.com/sindresorhus/npm-name","_id":"npm-name@1.2.0","_shasum":"7921fe772d5d2e69e2ce285350a17cf873447d5f","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7921fe772d5d2e69e2ce285350a17cf873447d5f","tarball":"http://registry-npm.ywwl.com/npm-name/download/npm-name-1.2.0.tgz","integrity":"sha512-NRZSxqDs1874VaM8+yp/iaAh5jEszLig0mh2VKsmRriK7m10d+7JaZszyf1CkXahok4JZA4aHcYcxqRfE8eeHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDK/EbWxP1D5p2Z0VOSz9ZxrgTwsHis3+R8i7ntaXcH7gIhANbAbpN02EGFGoYFvpC60Ba9ElJgPPB05R4gDlNBbyYD"}],"size":2094,"noattachment":false,"key":"/npm-name/-/npm-name-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"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":1445193001352,"_cnpm_publish_time":1445193001352,"dist-tags":{"latest":"8.1.1"}}