safe-resolve
require.resolve without throwing
Last updated 9 years ago by evanlucas .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install safe-resolve 
SYNC missed versions from official npm registry.

safe-resolve

Build Status Coverage Status

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)

Current Tags

  • 1.0.0                                ...           latest (9 years ago)

1 Versions

  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE