estree-is-identifier
check if an AST node is a call to require()
Last updated 3 years ago by goto-bus-stop .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install estree-is-identifier 
SYNC missed versions from official npm registry.

estree-is-identifier

check if an AST node is an identifier, optionally with a specific name

npm travis standard

Install

npm install estree-is-identifier

Usage

var isIdentifier = require('estree-is-identifier')

var node = parse('function a () {}')
isIdentifier(node) // false
var node = parse('abc')
isIdentifier(node) // true
isIdentifier(node, 'abc') // true
isIdentifier(node, 'xyz') // false

Also see the tests for more examples.

API

isIdentifier(node, name)

Check if node is an identifier. If name is given, check if the identifier has this name.

License

Apache-2.0

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

1 Versions

  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 41
This Month 125
Last Day 13
Last Week 84
Last Month 264
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |