New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webdetta

Package Overview
Dependencies
Maintainers
0
Versions
479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdetta - npm Package Compare versions

Comparing version 0.0.126 to 0.0.127

2

package.json
{
"name": "webdetta",
"version": "0.0.126",
"version": "0.0.127",
"author": "Fedot Kriutchenko <fodyadev@gmail.com>",

@@ -5,0 +5,0 @@ "description": "",

@@ -45,17 +45,18 @@ import { parseFn } from './common.js';

});
const stateValue = (handlerId, initial, sync) => {
const init = [
const syncValue = (handlerId, initial, allowRead, allowWrite) => {
const vars = [
`const V = this["#internals"].state ??= {};`,
`const H = ${JSON.stringify(handlerId)};`,
`if (!(H in V)) V[H] = ${JSON.stringify(initial)};`,
`const H = ${JSON.stringify(handlerId)};`
].join('');
const init =
`if (!(H in V)) V[H] = ${JSON.stringify(initial)};`;
return {
rpcHandler: !sync ? null : new Function('...a',
init + `return a.length > 0 ? (V[H] = a[0]) : V[H];`
rpcHandler: !allowRead ? null : new Function('...a',
vars + init + `return a.length > 0 ? (V[H] = a[0]) : V[H];`
),
instanceProperty: {
get: new Function(init + `return V[H];`),
get: new Function(vars + init + `return V[H];`),
set: new Function('value', (
(init + `V[H] = value;`) +
(!sync ? '' : `this["#internals"].rpc.cast(H, value);`)
(vars + `V[H] = value;`) +
(!allowWrite ? '' : `this["#internals"].rpc.cast(H, value);`)
)),

@@ -90,12 +91,12 @@ }

Client: SdkEntry((initial) => ({
client: (handlerId) => stateValue(handlerId, initial, false),
server: null
client: (handlerId) => syncValue(handlerId, initial, false, true),
server: (handlerId) => syncValue(handlerId, initial, true, false),
})),
Server: SdkEntry((initial) => ({
client: null,
server: (handlerId) => stateValue(handlerId, initial, false)
client: (handlerId) => syncValue(handlerId, initial, true, false),
server: (handlerId) => syncValue(handlerId, initial, false, true)
})),
Sync: SdkEntry((initial) => ({
client: (handlerId) => stateValue(handlerId, initial, true),
server: (handlerId) => stateValue(handlerId, initial, true)
client: (handlerId) => syncValue(handlerId, initial, true, true),
server: (handlerId) => syncValue(handlerId, initial, true, true)
}))

@@ -102,0 +103,0 @@ };

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