Commit 2101a218 authored by Alfakhori's avatar Alfakhori
Browse files

Merge branch 'Rosenstein' into 'master'

update some ui

See merge request !1
parents bf137ad8 91e89eab
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.
# @babel/plugin-proposal-object-rest-spread
> Compile object rest and spread to ES5
See our website [@babel/plugin-proposal-object-rest-spread](https://babeljs.io/docs/en/next/babel-plugin-proposal-object-rest-spread.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-proposal-object-rest-spread
```
or using yarn:
```sh
yarn add @babel/plugin-proposal-object-rest-spread --dev
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
return data;
}
function _pluginSyntaxObjectRestSpread() {
const data = _interopRequireDefault(require("@babel/plugin-syntax-object-rest-spread"));
_pluginSyntaxObjectRestSpread = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const ZERO_REFS = (() => {
const node = _core().types.identifier("a");
const property = _core().types.objectProperty(_core().types.identifier("key"), node);
const pattern = _core().types.objectPattern([property]);
return _core().types.isReferenced(node, property, pattern) ? 1 : 0;
})();
var _default = (0, _helperPluginUtils().declare)((api, opts) => {
api.assertVersion(7);
const {
useBuiltIns = false,
loose = false
} = opts;
if (typeof loose !== "boolean") {
throw new Error(".loose must be a boolean, or undefined");
}
function getExtendsHelper(file) {
return useBuiltIns ? _core().types.memberExpression(_core().types.identifier("Object"), _core().types.identifier("assign")) : file.addHelper("extends");
}
function hasRestElement(path) {
let foundRestElement = false;
visitRestElements(path, restElement => {
foundRestElement = true;
restElement.stop();
});
return foundRestElement;
}
function hasObjectPatternRestElement(path) {
let foundRestElement = false;
visitRestElements(path, restElement => {
if (restElement.parentPath.isObjectPattern()) {
foundRestElement = true;
restElement.stop();
}
});
return foundRestElement;
}
function visitRestElements(path, visitor) {
path.traverse({
Expression(path) {
const parentType = path.parent.type;
if (parentType === "AssignmentPattern" && path.key === "right" || parentType === "ObjectProperty" && path.parent.computed && path.key === "key") {
path.skip();
}
},
RestElement: visitor
});
}
function hasSpread(node) {
for (const prop of node.properties) {
if (_core().types.isSpreadElement(prop)) {
return true;
}
}
return false;
}
function extractNormalizedKeys(path) {
const props = path.node.properties;
const keys = [];
let allLiteral = true;
for (const prop of props) {
if (_core().types.isIdentifier(prop.key) && !prop.computed) {
keys.push(_core().types.stringLiteral(prop.key.name));
} else if (_core().types.isTemplateLiteral(prop.key)) {
keys.push(_core().types.cloneNode(prop.key));
} else if (_core().types.isLiteral(prop.key)) {
keys.push(_core().types.stringLiteral(String(prop.key.value)));
} else {
keys.push(_core().types.cloneNode(prop.key));
allLiteral = false;
}
}
return {
keys,
allLiteral
};
}
function replaceImpureComputedKeys(path) {
const impureComputedPropertyDeclarators = [];
for (const propPath of path.get("properties")) {
const key = propPath.get("key");
if (propPath.node.computed && !key.isPure()) {
const name = path.scope.generateUidBasedOnNode(key.node);
const declarator = _core().types.variableDeclarator(_core().types.identifier(name), key.node);
impureComputedPropertyDeclarators.push(declarator);
key.replaceWith(_core().types.identifier(name));
}
}
return impureComputedPropertyDeclarators;
}
function removeUnusedExcludedKeys(path) {
const bindings = path.getOuterBindingIdentifierPaths();
Object.keys(bindings).forEach(bindingName => {
const bindingParentPath = bindings[bindingName].parentPath;
if (path.scope.getBinding(bindingName).references > ZERO_REFS || !bindingParentPath.isObjectProperty()) {
return;
}
bindingParentPath.remove();
});
}
function createObjectSpread(path, file, objRef) {
const props = path.get("properties");
const last = props[props.length - 1];
_core().types.assertRestElement(last.node);
const restElement = _core().types.cloneNode(last.node);
last.remove();
const impureComputedPropertyDeclarators = replaceImpureComputedKeys(path);
const {
keys,
allLiteral
} = extractNormalizedKeys(path);
if (keys.length === 0) {
return [impureComputedPropertyDeclarators, restElement.argument, _core().types.callExpression(getExtendsHelper(file), [_core().types.objectExpression([]), _core().types.cloneNode(objRef)])];
}
let keyExpression;
if (!allLiteral) {
keyExpression = _core().types.callExpression(_core().types.memberExpression(_core().types.arrayExpression(keys), _core().types.identifier("map")), [file.addHelper("toPropertyKey")]);
} else {
keyExpression = _core().types.arrayExpression(keys);
}
return [impureComputedPropertyDeclarators, restElement.argument, _core().types.callExpression(file.addHelper(`objectWithoutProperties${loose ? "Loose" : ""}`), [_core().types.cloneNode(objRef), keyExpression])];
}
function replaceRestElement(parentPath, paramPath) {
if (paramPath.isAssignmentPattern()) {
replaceRestElement(parentPath, paramPath.get("left"));
return;
}
if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {
const elements = paramPath.get("elements");
for (let i = 0; i < elements.length; i++) {
replaceRestElement(parentPath, elements[i]);
}
}
if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {
const uid = parentPath.scope.generateUidIdentifier("ref");
const declar = _core().types.variableDeclaration("let", [_core().types.variableDeclarator(paramPath.node, uid)]);
parentPath.ensureBlock();
parentPath.get("body").unshiftContainer("body", declar);
paramPath.replaceWith(_core().types.cloneNode(uid));
}
}
return {
name: "proposal-object-rest-spread",
inherits: _pluginSyntaxObjectRestSpread().default,
visitor: {
Function(path) {
const params = path.get("params");
for (let i = params.length - 1; i >= 0; i--) {
replaceRestElement(params[i].parentPath, params[i]);
}
},
VariableDeclarator(path, file) {
if (!path.get("id").isObjectPattern()) {
return;
}
let insertionPath = path;
const originalPath = path;
visitRestElements(path.get("id"), path => {
if (!path.parentPath.isObjectPattern()) {
return;
}
if (originalPath.node.id.properties.length > 1 && !_core().types.isIdentifier(originalPath.node.init)) {
const initRef = path.scope.generateUidIdentifierBasedOnNode(originalPath.node.init, "ref");
originalPath.insertBefore(_core().types.variableDeclarator(initRef, originalPath.node.init));
originalPath.replaceWith(_core().types.variableDeclarator(originalPath.node.id, _core().types.cloneNode(initRef)));
return;
}
let ref = originalPath.node.init;
const refPropertyPath = [];
let kind;
path.findParent(path => {
if (path.isObjectProperty()) {
refPropertyPath.unshift(path.node.key.name);
} else if (path.isVariableDeclarator()) {
kind = path.parentPath.node.kind;
return true;
}
});
if (refPropertyPath.length) {
refPropertyPath.forEach(prop => {
ref = _core().types.memberExpression(ref, _core().types.identifier(prop));
});
}
const objectPatternPath = path.findParent(path => path.isObjectPattern());
const [impureComputedPropertyDeclarators, argument, callExpression] = createObjectSpread(objectPatternPath, file, ref);
if (loose) {
removeUnusedExcludedKeys(objectPatternPath);
}
_core().types.assertIdentifier(argument);
insertionPath.insertBefore(impureComputedPropertyDeclarators);
insertionPath.insertAfter(_core().types.variableDeclarator(argument, callExpression));
insertionPath = insertionPath.getSibling(insertionPath.key + 1);
path.scope.registerBinding(kind, insertionPath);
if (objectPatternPath.node.properties.length === 0) {
objectPatternPath.findParent(path => path.isObjectProperty() || path.isVariableDeclarator()).remove();
}
});
},
ExportNamedDeclaration(path) {
const declaration = path.get("declaration");
if (!declaration.isVariableDeclaration()) return;
const hasRest = declaration.get("declarations").some(path => hasRestElement(path.get("id")));
if (!hasRest) return;
const specifiers = [];
for (const name of Object.keys(path.getOuterBindingIdentifiers(path))) {
specifiers.push(_core().types.exportSpecifier(_core().types.identifier(name), _core().types.identifier(name)));
}
path.replaceWith(declaration.node);
path.insertAfter(_core().types.exportNamedDeclaration(null, specifiers));
},
CatchClause(path) {
const paramPath = path.get("param");
replaceRestElement(paramPath.parentPath, paramPath);
},
AssignmentExpression(path, file) {
const leftPath = path.get("left");
if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {
const nodes = [];
const refName = path.scope.generateUidBasedOnNode(path.node.right, "ref");
nodes.push(_core().types.variableDeclaration("var", [_core().types.variableDeclarator(_core().types.identifier(refName), path.node.right)]));
const [impureComputedPropertyDeclarators, argument, callExpression] = createObjectSpread(leftPath, file, _core().types.identifier(refName));
if (impureComputedPropertyDeclarators.length > 0) {
nodes.push(_core().types.variableDeclaration("var", impureComputedPropertyDeclarators));
}
const nodeWithoutSpread = _core().types.cloneNode(path.node);
nodeWithoutSpread.right = _core().types.identifier(refName);
nodes.push(_core().types.expressionStatement(nodeWithoutSpread));
nodes.push(_core().types.toStatement(_core().types.assignmentExpression("=", argument, callExpression)));
nodes.push(_core().types.expressionStatement(_core().types.identifier(refName)));
path.replaceWithMultiple(nodes);
}
},
ForXStatement(path) {
const {
node,
scope
} = path;
const leftPath = path.get("left");
const left = node.left;
if (!hasObjectPatternRestElement(leftPath)) {
return;
}
if (!_core().types.isVariableDeclaration(left)) {
const temp = scope.generateUidIdentifier("ref");
node.left = _core().types.variableDeclaration("var", [_core().types.variableDeclarator(temp)]);
path.ensureBlock();
if (node.body.body.length === 0 && path.isCompletionRecord()) {
node.body.body.unshift(_core().types.expressionStatement(scope.buildUndefinedNode()));
}
node.body.body.unshift(_core().types.expressionStatement(_core().types.assignmentExpression("=", left, _core().types.cloneNode(temp))));
} else {
const pattern = left.declarations[0].id;
const key = scope.generateUidIdentifier("ref");
node.left = _core().types.variableDeclaration(left.kind, [_core().types.variableDeclarator(key, null)]);
path.ensureBlock();
node.body.body.unshift(_core().types.variableDeclaration(node.left.kind, [_core().types.variableDeclarator(pattern, _core().types.cloneNode(key))]));
}
},
ArrayPattern(path) {
const objectPatterns = [];
visitRestElements(path, path => {
if (!path.parentPath.isObjectPattern()) {
return;
}
const objectPattern = path.parentPath;
const uid = path.scope.generateUidIdentifier("ref");
objectPatterns.push(_core().types.variableDeclarator(objectPattern.node, uid));
objectPattern.replaceWith(_core().types.cloneNode(uid));
path.skip();
});
if (objectPatterns.length > 0) {
const statementPath = path.getStatementParent();
statementPath.insertAfter(_core().types.variableDeclaration(statementPath.node.kind || "var", objectPatterns));
}
},
ObjectExpression(path, file) {
if (!hasSpread(path.node)) return;
const args = [];
let props = [];
function push() {
args.push(_core().types.objectExpression(props));
props = [];
}
for (const prop of path.node.properties) {
if (_core().types.isSpreadElement(prop)) {
push();
args.push(prop.argument);
} else {
props.push(prop);
}
}
if (props.length) {
push();
}
let helper;
if (loose) {
helper = getExtendsHelper(file);
} else {
try {
helper = file.addHelper("objectSpread2");
} catch (_unused) {
this.file.declarations["objectSpread2"] = null;
helper = file.addHelper("objectSpread");
}
}
path.replaceWith(_core().types.callExpression(helper, args));
}
}
};
});
exports.default = _default;
\ No newline at end of file
{
"_from": "@babel/plugin-proposal-object-rest-spread@^7.3.4",
"_id": "@babel/plugin-proposal-object-rest-spread@7.6.2",
"_inBundle": false,
"_integrity": "sha512-LDBXlmADCsMZV1Y9OQwMc0MyGZ8Ta/zlD9N67BfQT8uYwkRswiu2hU6nJKrjrt/58aH/vqfQlR/9yId/7A2gWw==",
"_location": "/@babel/plugin-proposal-object-rest-spread",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@babel/plugin-proposal-object-rest-spread@^7.3.4",
"name": "@babel/plugin-proposal-object-rest-spread",
"escapedName": "@babel%2fplugin-proposal-object-rest-spread",
"scope": "@babel",
"rawSpec": "^7.3.4",
"saveSpec": null,
"fetchSpec": "^7.3.4"
},
"_requiredBy": [
"/@babel/preset-env"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.6.2.tgz",
"_shasum": "8ffccc8f3a6545e9f78988b6bf4fe881b88e8096",
"_spec": "@babel/plugin-proposal-object-rest-spread@^7.3.4",
"_where": "C:\\Work\\OneDrive - bwstaff\\M4_Lab\\TV3\\NewVersion01\\LAFJLBmf939XYm5gj\\dev\\node_modules\\@babel\\preset-env",
"bundleDependencies": false,
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-syntax-object-rest-spread": "^7.2.0"
},
"deprecated": false,
"description": "Compile object rest and spread to ES5",
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"gitHead": "b9cb4af953afb1a5aeed9b18526192ab15bb45c1",
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/plugin-proposal-object-rest-spread",
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread"
},
"version": "7.6.2"
}
MIT License
Copyright (c) 2014-2018 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.
# @babel/plugin-proposal-optional-catch-binding
> Compile optional catch bindings
See our website [@babel/plugin-proposal-optional-catch-binding](https://babeljs.io/docs/en/next/babel-plugin-proposal-optional-catch-binding.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-proposal-optional-catch-binding
```
or using yarn:
```sh
yarn add @babel/plugin-proposal-optional-catch-binding --dev
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
return data;
}
function _pluginSyntaxOptionalCatchBinding() {
const data = _interopRequireDefault(require("@babel/plugin-syntax-optional-catch-binding"));
_pluginSyntaxOptionalCatchBinding = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = (0, _helperPluginUtils().declare)(api => {
api.assertVersion(7);
return {
name: "proposal-optional-catch-binding",
inherits: _pluginSyntaxOptionalCatchBinding().default,
visitor: {
CatchClause(path) {
if (!path.node.param) {
const uid = path.scope.generateUidIdentifier("unused");
const paramPath = path.get("param");
paramPath.replaceWith(uid);
}
}
}
};
});
exports.default = _default;
\ No newline at end of file
{
"_from": "@babel/plugin-proposal-optional-catch-binding@^7.2.0",
"_id": "@babel/plugin-proposal-optional-catch-binding@7.2.0",
"_inBundle": false,
"_integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==",
"_location": "/@babel/plugin-proposal-optional-catch-binding",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@babel/plugin-proposal-optional-catch-binding@^7.2.0",
"name": "@babel/plugin-proposal-optional-catch-binding",
"escapedName": "@babel%2fplugin-proposal-optional-catch-binding",
"scope": "@babel",
"rawSpec": "^7.2.0",
"saveSpec": null,
"fetchSpec": "^7.2.0"
},
"_requiredBy": [
"/@babel/preset-env"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz",
"_shasum": "135d81edb68a081e55e56ec48541ece8065c38f5",
"_spec": "@babel/plugin-proposal-optional-catch-binding@^7.2.0",
"_where": "C:\\Work\\OneDrive - bwstaff\\M4_Lab\\TV3\\NewVersion01\\LAFJLBmf939XYm5gj\\dev\\node_modules\\@babel\\preset-env",
"bundleDependencies": false,
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-syntax-optional-catch-binding": "^7.2.0"
},
"deprecated": false,
"description": "Compile optional catch bindings",
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/plugin-proposal-optional-catch-binding",
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-optional-catch-binding"
},
"version": "7.2.0"
}
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.
# @babel/plugin-proposal-unicode-property-regex
> Compile Unicode property escapes in Unicode regular expressions to ES5.
See our website [@babel/plugin-proposal-unicode-property-regex](https://babeljs.io/docs/en/next/babel-plugin-proposal-unicode-property-regex.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-proposal-unicode-property-regex
```
or using yarn:
```sh
yarn add @babel/plugin-proposal-unicode-property-regex --dev
```
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperCreateRegexpFeaturesPlugin = require("@babel/helper-create-regexp-features-plugin");
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _default = (0, _helperPluginUtils.declare)((api, options) => {
api.assertVersion(7);
const {
useUnicodeFlag = true
} = options;
if (typeof useUnicodeFlag !== "boolean") {
throw new Error(".useUnicodeFlag must be a boolean, or undefined");
}
return (0, _helperCreateRegexpFeaturesPlugin.createRegExpFeaturePlugin)({
name: "proposal-unicode-property-regex",
feature: "unicodePropertyEscape",
options: {
useUnicodeFlag
}
});
});
exports.default = _default;
\ No newline at end of file
{
"_from": "@babel/plugin-proposal-unicode-property-regex@^7.2.0",
"_id": "@babel/plugin-proposal-unicode-property-regex@7.7.0",
"_inBundle": false,
"_integrity": "sha512-mk34H+hp7kRBWJOOAR0ZMGCydgKMD4iN9TpDRp3IIcbunltxEY89XSimc6WbtSLCDrwcdy/EEw7h5CFCzxTchw==",
"_location": "/@babel/plugin-proposal-unicode-property-regex",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@babel/plugin-proposal-unicode-property-regex@^7.2.0",
"name": "@babel/plugin-proposal-unicode-property-regex",
"escapedName": "@babel%2fplugin-proposal-unicode-property-regex",
"scope": "@babel",
"rawSpec": "^7.2.0",
"saveSpec": null,
"fetchSpec": "^7.2.0"
},
"_requiredBy": [
"/@babel/preset-env"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.0.tgz",
"_shasum": "549fe1717a1bd0a2a7e63163841cb37e78179d5d",
"_spec": "@babel/plugin-proposal-unicode-property-regex@^7.2.0",
"_where": "C:\\Work\\OneDrive - bwstaff\\M4_Lab\\TV3\\NewVersion01\\LAFJLBmf939XYm5gj\\dev\\node_modules\\@babel\\preset-env",
"bugs": {
"url": "https://github.com/babel/babel/issues"
},
"bundleDependencies": false,
"dependencies": {
"@babel/helper-create-regexp-features-plugin": "^7.7.0",
"@babel/helper-plugin-utils": "^7.0.0"
},
"deprecated": false,
"description": "Compile Unicode property escapes in Unicode regular expressions to ES5.",
"devDependencies": {
"@babel/core": "^7.7.0",
"@babel/helper-plugin-test-runner": "^7.0.0"
},
"engines": {
"node": ">=4"
},
"gitHead": "97faa83953cb87e332554fa559a4956d202343ea",
"homepage": "https://babeljs.io/",
"keywords": [
"babel-plugin",
"regex",
"regexp",
"regular expressions",
"unicode properties",
"unicode"
],
"license": "MIT",
"main": "lib/index.js",
"name": "@babel/plugin-proposal-unicode-property-regex",
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-unicode-property-regex"
},
"version": "7.7.0"
}
/* eslint-disable @babel/development/plugin-name */
import { createRegExpFeaturePlugin } from "@babel/helper-create-regexp-features-plugin";
import { declare } from "@babel/helper-plugin-utils";
export default declare((api, options) => {
api.assertVersion(7);
const { useUnicodeFlag = true } = options;
if (typeof useUnicodeFlag !== "boolean") {
throw new Error(".useUnicodeFlag must be a boolean, or undefined");
}
return createRegExpFeaturePlugin({
name: "proposal-unicode-property-regex",
feature: "unicodePropertyEscape",
options: { useUnicodeFlag },
});
});
{
"plugins": [
[
"proposal-unicode-property-regex",
{
"useUnicodeFlag": true
}
]
]
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment