https://github.com/iguntur/nm-exists
Check if the node module has exists
https://github.com/iguntur/nm-exists
dependencies devdependencies exists module node npm package path
Last synced: 3 months ago
JSON representation
Check if the node module has exists
- Host: GitHub
- URL: https://github.com/iguntur/nm-exists
- Owner: iguntur
- License: mit
- Created: 2017-02-16T08:34:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T08:41:10.000Z (over 8 years ago)
- Last Synced: 2025-01-29T07:34:49.027Z (4 months ago)
- Topics: dependencies, devdependencies, exists, module, node, npm, package, path
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nm-exists [](https://travis-ci.org/iguntur/nm-exists)
> Check if the node module has exists
## Install
```
$ npm install --save nm-exists
```## Usage
```js
const nmExists = require('nm-exists');// async
nmExists('fs').then(exists => {
console.log(exists);
//=> 'true'
});// imagine `express` has been installed in `node_modules/express` directorie
nmExists('express').then(exists => {
console.log(exists);
//=> 'true'
});// sync
nmExists.sync('path');
//=> 'true'nmExists.sync('./unicorn');
//=> 'true'
```## API
### nmExists(moduleID)
Returns a promise for a boolean of whether the module exists
### nmExists.sync(moduleID)
Returns a boolean of whether the module exists
#### moduleID
Type: `string`
## License
MIT © [Guntur Poetra](http://iguntur.starmediateknik.com)