https://github.com/parro-it/npm-exists
check if a library exists on npm
https://github.com/parro-it/npm-exists
Last synced: 11 months ago
JSON representation
check if a library exists on npm
- Host: GitHub
- URL: https://github.com/parro-it/npm-exists
- Owner: parro-it
- License: mit
- Created: 2014-07-19T16:25:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T09:18:16.000Z (over 5 years ago)
- Last Synced: 2024-09-15T22:25:30.785Z (over 1 year ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# npm-exists
[](https://greenkeeper.io/)
check if a package exists on npm
[](http://travis-ci.org/parro-it/npm-exists)
[](https://npmjs.org/package/npm-exists)
[](https://npmjs.org/package/npm-exists)
# Getting Started
__Install__:
```sh
npm install npm-exists --save
```
__Usage__:
As module:
```js
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);
});
```
As cli:
```sh
npm-exists
```
# License
MIT © 2016, Andrea Parodi