require-from-string
Advanced tools
Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
var Module = module.constructor; | ||
var path = require('path'); | ||
@@ -10,6 +11,7 @@ module.exports = function requireFromString(code, filename) { | ||
var m = new Module(); | ||
m.paths = module.paths; | ||
var m = new Module(filename, module); | ||
m.filename = filename; | ||
m.paths = Module._nodeModulePaths(path.dirname(filename)); | ||
m._compile(code, filename); | ||
return m.exports; | ||
}; |
{ | ||
"name": "require-from-string", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Require module from string", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2668
4
13