require-or-die

1.0.0 • Public • Published

require-or-die

NPM version Build Status Dependency Status

Requires common.js modules as well as simple js files, that returns values.

Usage

var rod = require('require-or-die');
 
rod('./sample.js', function (err, value) {
    console.log(value);
})

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.02latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.02
0.3.00
0.2.00
0.1.10
0.1.00

Package Sidebar

Install

npm i require-or-die

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • floatdrop