Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vm2

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vm2 - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

22

lib/sandbox.js
// Generated by CoffeeScript 1.10.0
var EXTENSIONS, NATIVE_MODULES, Script, fs, noop, pa,
var NATIVE_MODULES, Script, noop,
slice = [].slice,

@@ -7,6 +7,2 @@ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

fs = parent.require('fs');
pa = parent.require('path');
Script = parent.require('vm').Script;

@@ -18,9 +14,3 @@

EXTENSIONS = {
".json": function(module, filename) {
return module.exports = JSON.parse(fs.readFileSync(filename, "utf8"));
}
};
/*

@@ -33,3 +23,8 @@ @param {Object} parent Parent's global object.

'use strict';
var _prepareRequire, _requireNative, _resolveFilename, global;
var EXTENSIONS, _prepareRequire, _requireNative, _resolveFilename, fs, global, pa;
EXTENSIONS = {
".json": function(module, filename) {
return module.exports = JSON.parse(fs.readFileSync(filename, "utf8"));
}
};
global = _this;

@@ -158,3 +153,2 @@ global.global = global.GLOBAL = global.root = global;

ex = error;
throw error
throw new VMError("Failed to load '" + filename + "': [" + ex.message + "]", "ELOADFAIL");

@@ -393,2 +387,4 @@ }

global.Buffer = _requireNative('buffer').Buffer;
fs = _requireNative('fs');
pa = _requireNative('path');

@@ -395,0 +391,0 @@ /*

@@ -16,3 +16,3 @@ {

],
"version": "0.2.3",
"version": "0.2.4",
"main": "index.js",

@@ -19,0 +19,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc