$ npm install safe-resolve
require.resolve
without throwing
$ npm install --save safe-resolve
$ npm test
const safe = require('safe-resolve')
// index.js exists
safe('./index.js')
// returns the resolved filepath
// biscuits.js does not exist
safe('./biscuits.js')
// => null
Evan Lucas
MIT (See LICENSE
for more info)
© 2010 - cnpmjs.org x YWFE | Home | YWFE