$ cnpm install babel-identifiers
Classify Babel identifiers
yarn add babel-identifiers
Identifier nodes fall into one of three kinds:
let binding = ...reference;a.staticAnd into one of four grammars:
let javascript = ...<jsx/>({}: flow)enum typescript {}import {getIdentifierKind, getIdentifierGrammar} from 'babel-identifiers';
isIdentifierLike(path); // true | false
getIdentifierKind(path); // "binding" | "reference" | "static"
getIdentifierGrammar(path); // "javascript" | "flow" | "typescript"
Copyright 2013 - present © cnpmjs.org | Home |