Skip to content

evanlucas/safe-resolve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

require.resolve without throwing

Resources

License

Stars

Watchers

Forks

Packages

No packages published