3.0.0 • Published 4 years ago

tryrequire v3.0.0

Weekly downloads
1,132
License
MIT
Repository
github
Last release
4 years ago

Try Require

Try to require and if could not return undefined.

Install

npm i tryrequire --save

Options

  • log : will log error when could not load
  • callback : will return function wich will have error parameter.

How to use?

const tryRequire = require('tryrequire');
const config = tryRequire('./config') || {}; 

License

MIT

3.0.0

4 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.5

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago