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.70 to 0.0.71

2

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

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

@@ -15,5 +15,5 @@ import { processCall } from '../rpc/proto.js';

export const parseFn = val => {
const { rawArgs, body, isArrow } = parser.parse(val);
const { rawArgs, body, isArrow, isAsync } = parser.parse(val);
if (isArrow) throw new Error('Arrow functions are not allowed.');
return { args: rawArgs, body };
return { args: rawArgs, body, isAsync };
}

@@ -20,0 +20,0 @@

@@ -46,7 +46,10 @@ import { parseFn } from './common.js';

const AsyncFunction = (async () => {}).constructor;
const Function_ = awaitResult => ({
Client: NestedSdkEntry((func) => {
const { args, body } = parseFn(func);
const { args, body, isAsync } = parseFn(func);
return {
client: (handlerId) => localFunction(new Function(...args, body)),
client: (handlerId) => localFunction(
new (isAsync ? AsyncFunction : Function)(...args, body)
),
server: (handlerId) => remoteFunction(handlerId, args, awaitResult),

@@ -53,0 +56,0 @@ };

@@ -7,4 +7,8 @@ import { validateSdkEntry } from './defs.js';

if (typeof obj == 'function') {
const { args, body } = parseFn(obj);
return `function (${args.join(',')}) {var ${vars.join(',')};${body.trim()}}`;
const { args, body, isAsync } = parseFn(obj);
return [
`${isAsync ? 'async ' : ''}function`,
`(${args.join(',')})`,
`{var ${vars.join(',')};${body.trim()}}`
].join(' ');
}

@@ -11,0 +15,0 @@ if (Array.isArray(obj))

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