Comparing version 3.6.4 to 3.6.5
@@ -0,1 +1,5 @@ | ||
v3.6.5 (2018-12-31) | ||
------------------- | ||
[fix] Security fixes | ||
v3.6.4 (2018-10-17) | ||
@@ -2,0 +6,0 @@ ------------------- |
@@ -214,23 +214,27 @@ 'use strict' | ||
case 'object': | ||
if (value === null) { | ||
return null; | ||
} else if (value instanceof Number) { return host.Number(value); | ||
} else if (value instanceof String) { return host.String(value); | ||
} else if (value instanceof Boolean) { return host.Boolean(value); | ||
} else if (value instanceof Date) { return Decontextify.instance(value, host.Date, deepTraps, flags); | ||
} else if (value instanceof RangeError) { return Decontextify.instance(value, host.RangeError, deepTraps, flags); | ||
} else if (value instanceof ReferenceError) { return Decontextify.instance(value, host.ReferenceError, deepTraps, flags); | ||
} else if (value instanceof SyntaxError) { return Decontextify.instance(value, host.SyntaxError, deepTraps, flags); | ||
} else if (value instanceof TypeError) { return Decontextify.instance(value, host.TypeError, deepTraps, flags); | ||
} else if (value instanceof VMError) { return Decontextify.instance(value, host.VMError, deepTraps, flags); | ||
} else if (value instanceof Error) { return Decontextify.instance(value, host.Error, deepTraps, flags); | ||
} else if (value instanceof Array) { return Decontextify.instance(value, host.Array, deepTraps, flags); | ||
} else if (value instanceof RegExp) { return Decontextify.instance(value, host.RegExp, deepTraps, flags); | ||
} else if (value instanceof Map) { return Decontextify.instance(value, host.Map, deepTraps, flags); | ||
} else if (value instanceof WeakMap) { return Decontextify.instance(value, host.WeakMap, deepTraps, flags); | ||
} else if (value instanceof Set) { return Decontextify.instance(value, host.Set, deepTraps, flags); | ||
} else if (value instanceof WeakSet) { return Decontextify.instance(value, host.WeakSet, deepTraps, flags); | ||
} else if (Promise && value instanceof Promise) { return Decontextify.instance(value, host.Promise, deepTraps, flags); | ||
} else { | ||
return Decontextify.object(value, traps, deepTraps, flags, mock); | ||
try { | ||
if (value === null) { | ||
return null; | ||
} else if (value instanceof Number) { return host.Number(value); | ||
} else if (value instanceof String) { return host.String(value); | ||
} else if (value instanceof Boolean) { return host.Boolean(value); | ||
} else if (value instanceof Date) { return Decontextify.instance(value, host.Date, deepTraps, flags); | ||
} else if (value instanceof RangeError) { return Decontextify.instance(value, host.RangeError, deepTraps, flags); | ||
} else if (value instanceof ReferenceError) { return Decontextify.instance(value, host.ReferenceError, deepTraps, flags); | ||
} else if (value instanceof SyntaxError) { return Decontextify.instance(value, host.SyntaxError, deepTraps, flags); | ||
} else if (value instanceof TypeError) { return Decontextify.instance(value, host.TypeError, deepTraps, flags); | ||
} else if (value instanceof VMError) { return Decontextify.instance(value, host.VMError, deepTraps, flags); | ||
} else if (value instanceof Error) { return Decontextify.instance(value, host.Error, deepTraps, flags); | ||
} else if (value instanceof Array) { return Decontextify.instance(value, host.Array, deepTraps, flags); | ||
} else if (value instanceof RegExp) { return Decontextify.instance(value, host.RegExp, deepTraps, flags); | ||
} else if (value instanceof Map) { return Decontextify.instance(value, host.Map, deepTraps, flags); | ||
} else if (value instanceof WeakMap) { return Decontextify.instance(value, host.WeakMap, deepTraps, flags); | ||
} else if (value instanceof Set) { return Decontextify.instance(value, host.Set, deepTraps, flags); | ||
} else if (value instanceof WeakSet) { return Decontextify.instance(value, host.WeakSet, deepTraps, flags); | ||
} else if (Promise && value instanceof Promise) { return Decontextify.instance(value, host.Promise, deepTraps, flags); | ||
} else { | ||
return Decontextify.object(value, traps, deepTraps, flags, mock); | ||
} | ||
} catch (e) { | ||
throw Decontextify.value(e); | ||
} | ||
@@ -425,24 +429,28 @@ case 'function': | ||
case 'object': | ||
if (value === null) { | ||
return null; | ||
} else if (value instanceof host.Number) { return host.Number(value); | ||
} else if (value instanceof host.String) { return host.String(value); | ||
} else if (value instanceof host.Boolean) { return host.Boolean(value); | ||
} else if (value instanceof host.Date) { return Contextify.instance(value, Date, deepTraps, flags); | ||
} else if (value instanceof host.RangeError) { return Contextify.instance(value, RangeError, deepTraps, flags); | ||
} else if (value instanceof host.ReferenceError) { return Contextify.instance(value, ReferenceError, deepTraps, flags); | ||
} else if (value instanceof host.SyntaxError) { return Contextify.instance(value, SyntaxError, deepTraps, flags); | ||
} else if (value instanceof host.TypeError) { return Contextify.instance(value, TypeError, deepTraps, flags); | ||
} else if (value instanceof host.VMError) { return Contextify.instance(value, VMError, deepTraps, flags); | ||
} else if (value instanceof host.Error) { return Contextify.instance(value, Error, deepTraps, flags); | ||
} else if (value instanceof host.Array) { return Contextify.instance(value, Array, deepTraps, flags); | ||
} else if (value instanceof host.RegExp) { return Contextify.instance(value, RegExp, deepTraps, flags); | ||
} else if (value instanceof host.Map) { return Contextify.instance(value, Map, deepTraps, flags); | ||
} else if (value instanceof host.WeakMap) { return Contextify.instance(value, WeakMap, deepTraps, flags); | ||
} else if (value instanceof host.Set) { return Contextify.instance(value, Set, deepTraps, flags); | ||
} else if (value instanceof host.WeakSet) { return Contextify.instance(value, WeakSet, deepTraps, flags); | ||
} else if (value instanceof host.Promise) { return Contextify.instance(value, Promise, deepTraps, flags); | ||
} else if (value instanceof host.Buffer) { return Contextify.instance(value, LocalBuffer, deepTraps, flags); | ||
} else { | ||
return Contextify.object(value, traps, deepTraps, flags, mock); | ||
try { | ||
if (value === null) { | ||
return null; | ||
} else if (value instanceof host.Number) { return host.Number(value); | ||
} else if (value instanceof host.String) { return host.String(value); | ||
} else if (value instanceof host.Boolean) { return host.Boolean(value); | ||
} else if (value instanceof host.Date) { return Contextify.instance(value, Date, deepTraps, flags); | ||
} else if (value instanceof host.RangeError) { return Contextify.instance(value, RangeError, deepTraps, flags); | ||
} else if (value instanceof host.ReferenceError) { return Contextify.instance(value, ReferenceError, deepTraps, flags); | ||
} else if (value instanceof host.SyntaxError) { return Contextify.instance(value, SyntaxError, deepTraps, flags); | ||
} else if (value instanceof host.TypeError) { return Contextify.instance(value, TypeError, deepTraps, flags); | ||
} else if (value instanceof host.VMError) { return Contextify.instance(value, VMError, deepTraps, flags); | ||
} else if (value instanceof host.Error) { return Contextify.instance(value, Error, deepTraps, flags); | ||
} else if (value instanceof host.Array) { return Contextify.instance(value, Array, deepTraps, flags); | ||
} else if (value instanceof host.RegExp) { return Contextify.instance(value, RegExp, deepTraps, flags); | ||
} else if (value instanceof host.Map) { return Contextify.instance(value, Map, deepTraps, flags); | ||
} else if (value instanceof host.WeakMap) { return Contextify.instance(value, WeakMap, deepTraps, flags); | ||
} else if (value instanceof host.Set) { return Contextify.instance(value, Set, deepTraps, flags); | ||
} else if (value instanceof host.WeakSet) { return Contextify.instance(value, WeakSet, deepTraps, flags); | ||
} else if (value instanceof host.Promise) { return Contextify.instance(value, Promise, deepTraps, flags); | ||
} else if (value instanceof host.Buffer) { return Contextify.instance(value, LocalBuffer, deepTraps, flags); | ||
} else { | ||
return Contextify.object(value, traps, deepTraps, flags, mock); | ||
} | ||
} catch (e) { | ||
throw Contextify.value(e); | ||
} | ||
@@ -449,0 +457,0 @@ case 'function': |
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "3.6.4", | ||
"version": "3.6.5", | ||
"main": "index.js", | ||
@@ -19,0 +19,0 @@ "repository": "github:patriksimek/vm2", |
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
62433
1404