diff --git a/packages/babel-helper-regex/package.json b/packages/babel-helper-regex/package.json index 6b0295e339..3613ce3347 100644 --- a/packages/babel-helper-regex/package.json +++ b/packages/babel-helper-regex/package.json @@ -6,7 +6,6 @@ "license": "MIT", "main": "lib/index.js", "dependencies": { - "babel-types": "7.0.0-beta.0", "lodash": "^4.2.0" } } diff --git a/packages/babel-helper-regex/src/index.js b/packages/babel-helper-regex/src/index.js index 998bbe4716..ef801daaa0 100644 --- a/packages/babel-helper-regex/src/index.js +++ b/packages/babel-helper-regex/src/index.js @@ -1,8 +1,7 @@ import pull from "lodash/pull"; -import * as t from "babel-types"; export function is(node: Object, flag: string): boolean { - return t.isRegExpLiteral(node) && node.flags.indexOf(flag) >= 0; + return node.type === "RegExpLiteral" && node.flags.indexOf(flag) >= 0; } export function pullFlag(node: Object, flag: string) {