@zzzzbov/module-exists
v0.0.2
Published
Checks if a node module may be included via `require`.
Downloads
1
Readme
moduleExists
Checks if a node module may be included via require
.
Installation
NPM:
$ npm i @zzzzbov/module-exists --S
Yarn:
$ yarn add @zzzzbov/module-exists
Usage
const moduleExists = require('@zzzzbov/module-exists');
if (moduleExists('example')) {
const example = require('example');
}