require-stream
v0.1.0
Published
A stream that requires modules
Downloads
1
Readme
Require stream
This stream receives module paths and emits the imported modules
var requireStream = require("require-stream");
var JSONStream = require("JSONStream");
var eventStream = require("event-stream");
var lineStream = eventStream.map(function(line, next) {
next(false, line + "\n")
});
stream = requireStream();
stream.pipe(JSONStream.stringify(false)).pipe(lineStream).pipe(process.stdout);
stream.write("test");
stream.write("export");
stream.end()
requireStream()
The stream requireStream()
function takes no arguments to initialize it and
it just returns an instance of a require stream that reveives module paths and
emits the imported modules
- @returns {stream} - The module importing stream