diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 15:31:11 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-14 15:31:11 +0800 |
| commit | aa773172311dcada759dfbaac485f4bc6e00bc21 (patch) | |
| tree | ca6d9a5eff3ab8f689f9acb4f0df791d9486813d /node_modules/@babel/plugin-transform-arrow-functions | |
| parent | c5a5384e846f242e901e859fe600d695d8990a9a (diff) | |
added babel
Diffstat (limited to 'node_modules/@babel/plugin-transform-arrow-functions')
5 files changed, 108 insertions, 0 deletions
diff --git a/node_modules/@babel/plugin-transform-arrow-functions/LICENSE b/node_modules/@babel/plugin-transform-arrow-functions/LICENSE new file mode 100644 index 00000000..f31575ec --- /dev/null +++ b/node_modules/@babel/plugin-transform-arrow-functions/LICENSE @@ -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. diff --git a/node_modules/@babel/plugin-transform-arrow-functions/README.md b/node_modules/@babel/plugin-transform-arrow-functions/README.md new file mode 100644 index 00000000..aada4d6e --- /dev/null +++ b/node_modules/@babel/plugin-transform-arrow-functions/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-transform-arrow-functions + +> Compile ES2015 arrow functions to ES5 + +See our website [@babel/plugin-transform-arrow-functions](https://babeljs.io/docs/en/babel-plugin-transform-arrow-functions) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-transform-arrow-functions +``` + +or using yarn: + +```sh +yarn add @babel/plugin-transform-arrow-functions --dev +``` diff --git a/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js b/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js new file mode 100644 index 00000000..16103d93 --- /dev/null +++ b/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _helperPluginUtils = require("@babel/helper-plugin-utils"); +var _default = (0, _helperPluginUtils.declare)((api, options) => { + var _api$assumption; + api.assertVersion(7); + const noNewArrows = (_api$assumption = api.assumption("noNewArrows")) != null ? _api$assumption : !options.spec; + return { + name: "transform-arrow-functions", + visitor: { + ArrowFunctionExpression(path) { + if (!path.isArrowFunctionExpression()) return; + { + path.arrowFunctionToExpression({ + allowInsertArrow: false, + noNewArrows, + specCompliant: !noNewArrows + }); + } + } + } + }; +}); +exports.default = _default; + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js.map b/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js.map new file mode 100644 index 00000000..250038b1 --- /dev/null +++ b/node_modules/@babel/plugin-transform-arrow-functions/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_helperPluginUtils","require","_default","declare","api","options","_api$assumption","assertVersion","noNewArrows","assumption","spec","name","visitor","ArrowFunctionExpression","path","isArrowFunctionExpression","arrowFunctionToExpression","allowInsertArrow","specCompliant","exports","default"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\n\nexport interface Options {\n spec?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(7);\n\n const noNewArrows = api.assumption(\"noNewArrows\") ?? !options.spec;\n\n return {\n name: \"transform-arrow-functions\",\n\n visitor: {\n ArrowFunctionExpression(path) {\n // In some conversion cases, it may have already been converted to a function while this callback\n // was queued up.\n if (!path.isArrowFunctionExpression()) return;\n\n if (process.env.BABEL_8_BREAKING) {\n path.arrowFunctionToExpression({\n // While other utils may be fine inserting other arrows to make more transforms possible,\n // the arrow transform itself absolutely cannot insert new arrow functions.\n allowInsertArrow: false,\n noNewArrows,\n });\n } else {\n path.arrowFunctionToExpression({\n allowInsertArrow: false,\n noNewArrows,\n\n // This is only needed for backward compat with @babel/traverse <7.13.0\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n specCompliant: !noNewArrows,\n });\n }\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAAqD,IAAAC,QAAA,GAMtC,IAAAC,0BAAO,EAAC,CAACC,GAAG,EAAEC,OAAgB,KAAK;EAAA,IAAAC,eAAA;EAChDF,GAAG,CAACG,aAAa,CAAC,CAAC,CAAC;EAEpB,MAAMC,WAAW,IAAAF,eAAA,GAAGF,GAAG,CAACK,UAAU,CAAC,aAAa,CAAC,YAAAH,eAAA,GAAI,CAACD,OAAO,CAACK,IAAI;EAElE,OAAO;IACLC,IAAI,EAAE,2BAA2B;IAEjCC,OAAO,EAAE;MACPC,uBAAuBA,CAACC,IAAI,EAAE;QAG5B,IAAI,CAACA,IAAI,CAACC,yBAAyB,CAAC,CAAC,EAAE;QAShC;UACLD,IAAI,CAACE,yBAAyB,CAAC;YAC7BC,gBAAgB,EAAE,KAAK;YACvBT,WAAW;YAIXU,aAAa,EAAE,CAACV;UAClB,CAAC,CAAC;QACJ;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC;AAAAW,OAAA,CAAAC,OAAA,GAAAlB,QAAA"}
\ No newline at end of file diff --git a/node_modules/@babel/plugin-transform-arrow-functions/package.json b/node_modules/@babel/plugin-transform-arrow-functions/package.json new file mode 100644 index 00000000..b4bf236f --- /dev/null +++ b/node_modules/@babel/plugin-transform-arrow-functions/package.json @@ -0,0 +1,36 @@ +{ + "name": "@babel/plugin-transform-arrow-functions", + "version": "7.22.5", + "description": "Compile ES2015 arrow functions to ES5", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-plugin-transform-arrow-functions" + }, + "homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-arrow-functions", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "keywords": [ + "babel-plugin" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + }, + "devDependencies": { + "@babel/core": "^7.22.5", + "@babel/helper-plugin-test-runner": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +}
\ No newline at end of file |
