An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# npm-exists

[![Greenkeeper badge](https://badges.greenkeeper.io/parro-it/npm-exists.svg)](https://greenkeeper.io/)

check if a package exists on npm

[![Build Status](https://secure.travis-ci.org/parro-it/npm-exists.png?branch=master)](http://travis-ci.org/parro-it/npm-exists)
[![NPM module](https://img.shields.io/npm/v/npm-exists.svg)](https://npmjs.org/package/npm-exists)
[![NPM downloads](https://img.shields.io/npm/dt/npm-exists.svg)](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