Socket
Socket
Sign inDemoInstall

require-from-string

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

license

6

index.js
'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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc