babel-identifiers
Classify Babel identifiers
Last updated 9 years ago by thejameskyle .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install babel-identifiers 
SYNC missed versions from official npm registry.

babel-identifiers

Classify Babel identifiers

Installation

yarn add babel-identifiers

Usage

Identifier nodes fall into one of three kinds:

  1. "binding" - let binding = ...
  2. "reference" - reference;
  3. "static" - a.static

And into one of four grammars:

  1. "javascript" - let javascript = ...
  2. "jsx" - <jsx/>
  3. "flow" - ({}: flow)
  4. "typescript" - enum typescript {}
import {getIdentifierKind, getIdentifierGrammar} from 'babel-identifiers';

isIdentifierLike(path); // true | false
getIdentifierKind(path); // "binding" | "reference" | "static"
getIdentifierGrammar(path); // "javascript" | "flow" | "typescript"

Current Tags

  • 2.0.1                                ...           latest (7 years ago)

6 Versions

  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           9 years ago
  • 1.1.2                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 25
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 0
Last Month 6
Dependencies (0)
None
Dev Dependencies (5)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE