check if a library exists on npm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
cli.js
index.js
license
package.json
readme.md
test.js

readme.md

npm-exists

Greenkeeper badge

check if a package exists on npm

Build Status NPM module NPM downloads

Getting Started

Install:

npm install npm-exists --save

Usage:

const exists = require('npm-exists');

exists('request')
	.then(moduleExists => {
		if (moduleExists) {
			console.log('gosh, `request` name already taken!');
		} else {
			console.log('you can register `request`');
		}
	});

// use custom registry:
exists('request', 'http://localhost:5432/')
	.then(moduleExists => {
		console.log(moduleExists);
	});

License

MIT © 2016, Andrea Parodi