Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
22
my-app/node_modules/@babel/helper-optimise-call-expression/LICENSE
generated
vendored
Executable file
22
my-app/node_modules/@babel/helper-optimise-call-expression/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
19
my-app/node_modules/@babel/helper-optimise-call-expression/README.md
generated
vendored
Executable file
19
my-app/node_modules/@babel/helper-optimise-call-expression/README.md
generated
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-optimise-call-expression
|
||||
|
||||
> Helper function to optimise call expression
|
||||
|
||||
See our website [@babel/helper-optimise-call-expression](https://babeljs.io/docs/en/babel-helper-optimise-call-expression) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-optimise-call-expression
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-optimise-call-expression
|
||||
```
|
33
my-app/node_modules/@babel/helper-optimise-call-expression/lib/index.js
generated
vendored
Executable file
33
my-app/node_modules/@babel/helper-optimise-call-expression/lib/index.js
generated
vendored
Executable file
|
@ -0,0 +1,33 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = optimiseCallExpression;
|
||||
var _t = require("@babel/types");
|
||||
const {
|
||||
callExpression,
|
||||
identifier,
|
||||
isIdentifier,
|
||||
isSpreadElement,
|
||||
memberExpression,
|
||||
optionalCallExpression,
|
||||
optionalMemberExpression
|
||||
} = _t;
|
||||
function optimiseCallExpression(callee, thisNode, args, optional) {
|
||||
if (args.length === 1 && isSpreadElement(args[0]) && isIdentifier(args[0].argument, {
|
||||
name: "arguments"
|
||||
})) {
|
||||
if (optional) {
|
||||
return optionalCallExpression(optionalMemberExpression(callee, identifier("apply"), false, true), [thisNode, args[0].argument], false);
|
||||
}
|
||||
return callExpression(memberExpression(callee, identifier("apply")), [thisNode, args[0].argument]);
|
||||
} else {
|
||||
if (optional) {
|
||||
return optionalCallExpression(optionalMemberExpression(callee, identifier("call"), false, true), [thisNode, ...args], false);
|
||||
}
|
||||
return callExpression(memberExpression(callee, identifier("call")), [thisNode, ...args]);
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
1
my-app/node_modules/@babel/helper-optimise-call-expression/lib/index.js.map
generated
vendored
Executable file
1
my-app/node_modules/@babel/helper-optimise-call-expression/lib/index.js.map
generated
vendored
Executable file
|
@ -0,0 +1 @@
|
|||
{"version":3,"names":["_t","require","callExpression","identifier","isIdentifier","isSpreadElement","memberExpression","optionalCallExpression","optionalMemberExpression","optimiseCallExpression","callee","thisNode","args","optional","length","argument","name"],"sources":["../src/index.ts"],"sourcesContent":["import {\n callExpression,\n identifier,\n isIdentifier,\n isSpreadElement,\n memberExpression,\n optionalCallExpression,\n optionalMemberExpression,\n} from \"@babel/types\";\nimport type {\n CallExpression,\n Expression,\n OptionalCallExpression,\n} from \"@babel/types\";\n\n/**\n * A helper function that generates a new call expression with given thisNode.\n It will also optimize `(...arguments)` to `.apply(arguments)`\n *\n * @export\n * @param {Expression} callee The callee of call expression\n * @param {Expression} thisNode The desired this of call expression\n * @param {Readonly<CallExpression[\"arguments\"]>} args The arguments of call expression\n * @param {boolean} optional Whether the call expression is optional\n * @returns {CallExpression | OptionalCallExpression} The generated new call expression\n */\nexport default function optimiseCallExpression(\n callee: Expression,\n thisNode: Expression,\n args: Readonly<CallExpression[\"arguments\"]>,\n optional: boolean,\n): CallExpression | OptionalCallExpression {\n if (\n args.length === 1 &&\n isSpreadElement(args[0]) &&\n isIdentifier(args[0].argument, { name: \"arguments\" })\n ) {\n // a.b?.(...arguments);\n if (optional) {\n return optionalCallExpression(\n optionalMemberExpression(callee, identifier(\"apply\"), false, true),\n [thisNode, args[0].argument],\n false,\n );\n }\n // a.b(...arguments);\n return callExpression(memberExpression(callee, identifier(\"apply\")), [\n thisNode,\n args[0].argument,\n ]);\n } else {\n // a.b?.(arg1, arg2)\n if (optional) {\n return optionalCallExpression(\n optionalMemberExpression(callee, identifier(\"call\"), false, true),\n [thisNode, ...args],\n false,\n );\n }\n // a.b(arg1, arg2)\n return callExpression(memberExpression(callee, identifier(\"call\")), [\n thisNode,\n ...args,\n ]);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAQsB;EAPpBC,cAAc;EACdC,UAAU;EACVC,YAAY;EACZC,eAAe;EACfC,gBAAgB;EAChBC,sBAAsB;EACtBC;AAAwB,IAAAR,EAAA;AAmBX,SAASS,sBAAsBA,CAC5CC,MAAkB,EAClBC,QAAoB,EACpBC,IAA2C,EAC3CC,QAAiB,EACwB;EACzC,IACED,IAAI,CAACE,MAAM,KAAK,CAAC,IACjBT,eAAe,CAACO,IAAI,CAAC,CAAC,CAAC,CAAC,IACxBR,YAAY,CAACQ,IAAI,CAAC,CAAC,CAAC,CAACG,QAAQ,EAAE;IAAEC,IAAI,EAAE;EAAY,CAAC,CAAC,EACrD;IAEA,IAAIH,QAAQ,EAAE;MACZ,OAAON,sBAAsB,CAC3BC,wBAAwB,CAACE,MAAM,EAAEP,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAClE,CAACQ,QAAQ,EAAEC,IAAI,CAAC,CAAC,CAAC,CAACG,QAAQ,CAAC,EAC5B,KACF,CAAC;IACH;IAEA,OAAOb,cAAc,CAACI,gBAAgB,CAACI,MAAM,EAAEP,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CACnEQ,QAAQ,EACRC,IAAI,CAAC,CAAC,CAAC,CAACG,QAAQ,CACjB,CAAC;EACJ,CAAC,MAAM;IAEL,IAAIF,QAAQ,EAAE;MACZ,OAAON,sBAAsB,CAC3BC,wBAAwB,CAACE,MAAM,EAAEP,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EACjE,CAACQ,QAAQ,EAAE,GAAGC,IAAI,CAAC,EACnB,KACF,CAAC;IACH;IAEA,OAAOV,cAAc,CAACI,gBAAgB,CAACI,MAAM,EAAEP,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAClEQ,QAAQ,EACR,GAAGC,IAAI,CACR,CAAC;EACJ;AACF"}
|
28
my-app/node_modules/@babel/helper-optimise-call-expression/package.json
generated
vendored
Executable file
28
my-app/node_modules/@babel/helper-optimise-call-expression/package.json
generated
vendored
Executable file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "@babel/helper-optimise-call-expression",
|
||||
"version": "7.22.5",
|
||||
"description": "Helper function to optimise call expression",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-optimise-call-expression"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-helper-optimise-call-expression",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.22.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/generator": "^7.22.5",
|
||||
"@babel/parser": "^7.22.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"type": "commonjs"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue