{"name":"npm-name","version":"3.0.0","description":"Check whether a package name is available on npm","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/npm-name.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["name","available","package","npm","pkg","name","app","check","taken"],"dependencies":{"got":"^6.3.0","lodash.zip":"^4.0.0","registry-url":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"21278e80fbef5ffc7ed811feff81d02b88d6b0fd","bugs":{"url":"https://github.com/sindresorhus/npm-name/issues"},"homepage":"https://github.com/sindresorhus/npm-name#readme","_id":"npm-name@3.0.0","_shasum":"f72e4047993a0bf932a7d8db780babff77ba723f","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f72e4047993a0bf932a7d8db780babff77ba723f","tarball":"http://registry-npm.ywwl.com/npm-name/download/npm-name-3.0.0.tgz","integrity":"sha512-5unoHwneSxvn4n/37ItNmcROOJmkF+0EY3Ghut6wKBFAKzpAbrqWXhrxbpUFgb6Ql7OaZAWEkgvQus9pIZs/BA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYmvweW8U17YYAfXZBZAhfp7PLt8BJCYyoc0OSBTALMAiBh4XrAmwntlWLHeoXV4a8VY0mBu4P6WHvi4RIifWfGYA=="}],"size":1893,"noattachment":false,"key":"/npm-name/-/npm-name-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/npm-name-3.0.0.tgz_1460625686795_0.28738949936814606"},"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":1460625687404,"_cnpm_publish_time":1460625687404,"dist-tags":{"latest":"8.1.1"}}