🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

isolated-vm

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isolated-vm - npm Package Compare versions

Comparing version

to
3.3.9

2

package.json
{
"name": "isolated-vm",
"version": "3.3.8",
"version": "3.3.9",
"description": "Access to multiple isolates",

@@ -5,0 +5,0 @@ "main": "isolated-vm.js",

@@ -17,6 +17,20 @@ const ivm = require('isolated-vm');

assert.throws(() =>
context.evalSync(`Promise.race([ 1, Promise.reject(new Error('hello')) ])`, { promise: true }),
await assert.rejects(() =>
context.evalSync(`Promise.reject(new Error('hello'))`, { promise: true }).result,
/hello/);
assert.doesNotThrow(() =>
context.evalSync('Promise.reject(new Error(1)).catch(() => {})'));
assert.doesNotThrow(() => context.evalSync(`
(async () => {
try {
await new Promise((_, reject) => reject(new Error('abc')));
} catch (err) {
// ignore
}
})();
`));
try {

@@ -23,0 +37,0 @@ context.evalSync(`

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

Sorry, the diff of this file is not supported yet