sdfsdfs
This commit is contained in:
19
node_modules/pixi.js/lib/utils/browser/unsafeEvalSupported.js
generated
vendored
Normal file
19
node_modules/pixi.js/lib/utils/browser/unsafeEvalSupported.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
"use strict";
|
||||
let unsafeEval;
|
||||
function unsafeEvalSupported() {
|
||||
if (typeof unsafeEval === "boolean") {
|
||||
return unsafeEval;
|
||||
}
|
||||
try {
|
||||
const func = new Function("param1", "param2", "param3", "return param1[param2] === param3;");
|
||||
unsafeEval = func({ a: "b" }, "a", "b") === true;
|
||||
} catch (e) {
|
||||
unsafeEval = false;
|
||||
}
|
||||
return unsafeEval;
|
||||
}
|
||||
|
||||
exports.unsafeEvalSupported = unsafeEvalSupported;
|
||||
//# sourceMappingURL=unsafeEvalSupported.js.map
|
Reference in New Issue
Block a user