require-file

1.0.2 • Public • Published

require-file Code Climate

Require file as a string both in node/browser. Simple wrapper for rfile, but works browser-side via synchronous XMLHttpRequest. It might be very useful for tests, when you need to include some big external files as strings.

$ npm install require-file

var rfile = require('require-file');
var result;
 
try {
    result = rfile('./local/path');
}
catch (e) {
 
}

If you need async version, take a look at browser-request.

NPM

Package Sidebar

Install

npm i require-file

Weekly Downloads

2

Version

1.0.2

License

Unlicensed

Last publish

Collaborators

  • dfcreative