parent
2e3eec6646
commit
e7e0c25d6a
@ -1,3 +0,0 @@
|
||||
src
|
||||
test
|
||||
*.log
|
||||
@ -1,19 +0,0 @@
|
||||
# @babel/helper-regex
|
||||
|
||||
> Helper function to check for literal RegEx
|
||||
|
||||
See our website [@babel/helper-regex](https://babeljs.io/docs/en/babel-helper-regex) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/helper-regex
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-regex --dev
|
||||
```
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "@babel/helper-regex",
|
||||
"version": "7.10.5",
|
||||
"description": "Helper function to check for literal RegEx",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-regex"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
import pull from "lodash/pull";
|
||||
|
||||
export function is(node: Object, flag: string): boolean {
|
||||
return node.type === "RegExpLiteral" && node.flags.indexOf(flag) >= 0;
|
||||
}
|
||||
|
||||
export function pullFlag(node: Object, flag: string) {
|
||||
const flags = node.flags.split("");
|
||||
if (node.flags.indexOf(flag) < 0) return;
|
||||
pull(flags, flag);
|
||||
node.flags = flags.join("");
|
||||
}
|
||||
@ -645,14 +645,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/helper-regex@workspace:packages/babel-helper-regex":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@babel/helper-regex@workspace:packages/babel-helper-regex"
|
||||
dependencies:
|
||||
lodash: ^4.17.19
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@babel/helper-remap-async-to-generator@npm:^7.10.4":
|
||||
version: 7.11.4
|
||||
resolution: "@babel/helper-remap-async-to-generator@npm:7.11.4"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user