A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/goto-bus-stop/estree-is-identifier below:

goto-bus-stop/estree-is-identifier: check if an AST node is an identifier, optionally with a specific name

estree-is-identifier

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

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4