require-file
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 = ;var result; try result = ;catch e
If you need async version, take a look at browser-request.