* 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
24 lines
569 B
JavaScript
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;
|
|
}
|