Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 577 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 577 Bytes

make-module Build Status codecov.io

Create a node module from a string of code, and maybe a file name.

npm install make-module

var file = path.join(__dirname, "./some-module.js");
var code = fs.readFileSync(file).toString();
var someModule = makeModule(code, file);
// find `module.exports` at `someModule.exports`