3.0.0 • Published 5 years ago

tryrequire v3.0.0

Weekly downloads
1,132
License
MIT
Repository
github
Last release
5 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

5 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

11 years ago

1.1.2

11 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago