Comparing version 0.0.117 to 0.0.118
{ | ||
"name": "webdetta", | ||
"version": "0.0.117", | ||
"version": "0.0.118", | ||
"author": "Fedot Kriutchenko <fodyadev@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -46,23 +46,17 @@ import { parseFn } from './common.js'; | ||
const stateValue = (handlerId, initial, sync) => { | ||
const initval = [ | ||
const init = [ | ||
`const V = this["#internals"]["#vals"] ??= {};`, | ||
`const H = ${JSON.stringify(handlerId)};`, | ||
`if (!(H in V)) V[H] = ${JSON.stringify(initial)};`, | ||
]; | ||
].join(''); | ||
return { | ||
rpcHandler: !sync ? null : new Function('...a', [ | ||
...initval, | ||
`return a.length > 0 ? (V[H] = a[0]) : V[H];` | ||
].join('')), | ||
rpcHandler: !sync ? null : new Function('...a', | ||
init + `return a.length > 0 ? (V[H] = a[0]) : V[H];` | ||
), | ||
instanceProperty: { | ||
get: new Function([ | ||
...initval, | ||
`return V[H];` | ||
].join('')), | ||
set: new Function('value', [ | ||
...initval, | ||
`V[H] = value;`, | ||
!sync ? '' : | ||
`this["#internals"].cast(${JSON.stringify(handlerId)}, value);` | ||
].join('')), | ||
get: new Function(init + `return V[H];`), | ||
set: new Function('value', ( | ||
(init + `V[H] = value;`) + | ||
(!sync ? '' : `this["#internals"].cast(H, value);`) | ||
)), | ||
} | ||
@@ -69,0 +63,0 @@ }; |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
106350
3126