Package Exports
- npm-taken
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-taken) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
npm-taken
Find out if a module name is already in the npm registry.
Usage
var npmTaken = require('npm-taken');
npmTaken('my-awesome-package-name', function(err, taken) {
if (err) {
// Uh Oh! Something bad happened...
}
if (taken === false) {
// It's not taken... Hurry, make something cool!
}
if (taken) {
// somebody beat you to it!
// taken will be an object containing all kinds of metadata about the existing package.
}
});API
npmTaken(packageName, [registryUrl,] callback)
packageName
Required
Type: string
The package name you want.
registryUrl
Optional
Type: string
Use an alternate registry to perform the lookup.
Default is https://registry.npmjs.com/.
callback
Optional
Type: function(err, response)
Will be called with:
err: if there was some problem communicating with the registry,nullotherwise.response: will befalseif the name is available, otherwise it will be an object containing metadata about the existing module.
License
MIT © James Talmage
