Huáng Jùnliàng e39b508030
Add @babel/helper-validator-identifier (#11289)
* refactor: replace esutils.keywords.isIdentifierNameES6 by helper-validator-identifier

* refactor: replace esutils isReservedWordES6 by isKeyword || isReservedWord

* address review comments

* chore: specify both “main” and “exports”

* build helper-validator-identifier before babel-types
2020-03-20 12:23:14 +01:00

24 lines
569 B
JavaScript

/* eslint max-len: 0 */
// @flow
import * as charCodes from "charcodes";
export {
isIdentifierStart,
isIdentifierChar,
isReservedWord,
isStrictBindOnlyReservedWord,
isStrictBindReservedWord,
isStrictReservedWord,
isKeyword,
} from "@babel/helper-validator-identifier";
export const keywordRelationalOperator = /^in(stanceof)?$/;
// Test whether a current state character code and next character code is @
export function isIteratorStart(current: number, next: number): boolean {
return current === charCodes.atSign && next === charCodes.atSign;
}