JSPM

safe-resolve

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 52067
  • Score
    100M100P100Q143959F
  • License MIT

require.resolve without throwing

Package Exports

  • safe-resolve

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (safe-resolve) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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)