@rainydio/contained-require
v0.0.6
Published
Instance of require function with it's own cache
Downloads
7
Readme
contained-require
Simulating instance of require function with it's own cache, resolve etc. Also handling async require calls.
"use strict";
const assert = require("assert");
const crequire = require("contained-require")(module);
const one1 = require("../test/data/one");
const one2 = crequire("../test/data/one");
assert(one1 !== one2);
crequire(module)
Creates instance of crequire, module
current module should be
passed as an argument