safe-resolve
v1.0.0
Published
require.resolve without throwing
Downloads
111,908
Readme
safe-resolve
require.resolve
without throwing
Install
$ npm install --save safe-resolve
Test
$ npm test
Usage
const safe = require('safe-resolve')
// index.js exists
safe('./index.js')
// returns the resolved filepath
// biscuits.js does not exist
safe('./biscuits.js')
// => null
Author
Evan Lucas
License
MIT (See LICENSE
for more info)