babel-identifiers
Classify Babel identifiers
Last updated 6 years ago by thejameskyle .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (6 years ago)

6 Versions

  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           8 years ago
  • 1.1.2                                ...           8 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |