Socket
Socket
Sign inDemoInstall

estree-is-identifier

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

estree-is-identifier

check if an AST node is a call to require()


Version published
Weekly downloads
12K
increased by5.37%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 11 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc