require-optional
Usage
Install via npm:
$ npm install require-optional
Basic usage:
var requireOptional = var optDep = if optDep /* do stuff with optDep */
require-optional
can return a default value:
var optDep =
require-optional
accepts an error callback for when the module is not found:
require-optional
can also require relative modules:
var optDep =