safe-node-require

1.0.0 • Public • Published

safe-node-require

NPM version NPM downloads Build Status donate

Install

yarn add safe-node-require

Usage

const req = require('safe-node-require')

// foo.js does not exist
req('./foo')
//=> null

// bar.js exists
req('./bar')
//=> {} the module

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

safe-node-require © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

Readme

Keywords

none

Package Sidebar

Install

npm i safe-node-require

Weekly Downloads

5

Version

1.0.0

License

MIT

Last publish

Collaborators

  • rem