diff options
Diffstat (limited to 'node_modules/@babel/plugin-transform-literals')
3 files changed, 0 insertions, 116 deletions
diff --git a/node_modules/@babel/plugin-transform-literals/README.md b/node_modules/@babel/plugin-transform-literals/README.md deleted file mode 100644 index adc5c3ab..00000000 --- a/node_modules/@babel/plugin-transform-literals/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# @babel/plugin-transform-literals - -> Compile ES2015 unicode string and number literals to ES5 - -## Example - -**In** - -```js -var b = 0b11; // binary integer literal -var o = 0o7; // octal integer literal -const u = 'Hello\u{000A}\u{0009}!'; // unicode string literals, newline and tab -``` - -**Out** - -```js -var b = 3; // binary integer literal -var o = 7; // octal integer literal -const u = 'Hello\n\t!'; // unicode string literals, newline and tab -``` - -## Installation - -```sh -npm install --save-dev @babel/plugin-transform-literals -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["@babel/plugin-transform-literals"] -} -``` - -### Via CLI - -```sh -babel --plugins @babel/plugin-transform-literals script.js -``` - -### Via Node API - -```javascript -require("@babel/core").transform("code", { - plugins: ["@babel/plugin-transform-literals"] -}); -``` diff --git a/node_modules/@babel/plugin-transform-literals/lib/index.js b/node_modules/@babel/plugin-transform-literals/lib/index.js deleted file mode 100644 index 5f42daa3..00000000 --- a/node_modules/@babel/plugin-transform-literals/lib/index.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _helperPluginUtils() { - const data = require("@babel/helper-plugin-utils"); - - _helperPluginUtils = function _helperPluginUtils() { - return data; - }; - - return data; -} - -var _default = (0, _helperPluginUtils().declare)(api => { - api.assertVersion(7); - return { - visitor: { - NumericLiteral({ - node - }) { - if (node.extra && /^0[ob]/i.test(node.extra.raw)) { - node.extra = undefined; - } - }, - - StringLiteral({ - node - }) { - if (node.extra && /\\[u]/gi.test(node.extra.raw)) { - node.extra = undefined; - } - } - - } - }; -}); - -exports.default = _default;
\ No newline at end of file diff --git a/node_modules/@babel/plugin-transform-literals/package.json b/node_modules/@babel/plugin-transform-literals/package.json deleted file mode 100644 index 79ade854..00000000 --- a/node_modules/@babel/plugin-transform-literals/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@babel/plugin-transform-literals", - "version": "7.0.0-beta.47", - "description": "Compile ES2015 unicode string and number literals to ES5", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-literals", - "license": "MIT", - "main": "lib/index.js", - "keywords": [ - "babel-plugin" - ], - "dependencies": { - "@babel/helper-plugin-utils": "7.0.0-beta.47" - }, - "peerDependencies": { - "@babel/core": "7.0.0-beta.47" - }, - "devDependencies": { - "@babel/core": "7.0.0-beta.47", - "@babel/helper-plugin-test-runner": "7.0.0-beta.47" - } -} |
