make-module

    3.0.0 • Public • Published

    make-module Build Status

    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`

    Install

    npm i make-module

    DownloadsWeekly Downloads

    15

    Version

    3.0.0

    License

    MIT

    Last publish

    Collaborators

    • nickbottomley