Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-proposal-partial-application

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-partial-application - npm Package Compare versions

Comparing version 7.16.7 to 7.17.12

10

lib/index.js

@@ -81,9 +81,13 @@ "use strict";

if (node.callee.type === "MemberExpression") {
const receiverLVal = path.scope.generateUidIdentifierBasedOnNode(node.callee.object);
const {
object: receiver,
property
} = node.callee;
const receiverLVal = path.scope.generateUidIdentifierBasedOnNode(receiver);
scope.push({
id: receiverLVal
});
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(receiverLVal), node.callee.object), _core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), _core.types.memberExpression(_core.types.cloneNode(receiverLVal), node.callee.property)), ...argsInitializers, _core.types.functionExpression(_core.types.cloneNode(node.callee.property), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.memberExpression(_core.types.cloneNode(functionLVal), _core.types.identifier("call")), [_core.types.cloneNode(receiverLVal), ...args]))], []), false, false));
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(receiverLVal), receiver), _core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), _core.types.memberExpression(_core.types.cloneNode(receiverLVal), property)), ...argsInitializers, _core.types.functionExpression(_core.types.isIdentifier(property) ? _core.types.cloneNode(property) : path.scope.generateUidIdentifierBasedOnNode(property), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.memberExpression(_core.types.cloneNode(functionLVal), _core.types.identifier("call")), [_core.types.cloneNode(receiverLVal), ...args]))], []), false, false));
} else {
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), node.callee), ...argsInitializers, _core.types.functionExpression(_core.types.cloneNode(node.callee), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.cloneNode(functionLVal), args))], []), false, false));
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), node.callee), ...argsInitializers, _core.types.functionExpression(_core.types.isIdentifier(node.callee) ? _core.types.cloneNode(node.callee) : path.scope.generateUidIdentifierBasedOnNode(node.callee), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.cloneNode(functionLVal), args))], []), false, false));
}

@@ -90,0 +94,0 @@

{
"name": "@babel/plugin-proposal-partial-application",
"version": "7.16.7",
"version": "7.17.12",
"description": "Introduces a new ? token in an argument list which allows for partially applying an argument list to a call expression",

@@ -20,3 +20,3 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^7.16.7",
"@babel/helper-plugin-utils": "^7.17.12",
"@babel/plugin-syntax-partial-application": "^7.16.7"

@@ -28,3 +28,3 @@ },

"devDependencies": {
"@babel/core": "^7.16.7",
"@babel/core": "^7.17.12",
"@babel/helper-plugin-test-runner": "^7.16.7"

@@ -31,0 +31,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