require-or-die
Requires common.js modules as well as simple js files, that returns values.
Usage
var rod = ;
API
require(path, [options], callback)
path
Type: String
Path to required file (will be resolved by require.resolve
).
options
Type: Object
Options, that will be passed to fs.readFile.
callback
Type: Function
Function, that will be called, when contents is read and processed. Signature pretty common: function (err, value)
.
require.sync(path)
Same as require
, but in sync way.
License
MIT (c) 2014 Vsevolod Strukchinsky