# estree-is-identifier

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

Latest version **1.0.0** (published 2018-01-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install estree-is-identifier
pnpm add estree-is-identifier
yarn add estree-is-identifier
bun add estree-is-identifier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-01-11 |
| First published | 2018-01-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Renée Kooi |
| Maintainers | goto-bus-stop |
| Keywords | check, detect, estree, require, pattern |

## Links

- npm: https://www.npmjs.com/package/estree-is-identifier
- Repository: https://github.com/goto-bus-stop/estree-is-identifier
- Issues: https://github.com/goto-bus-stop/estree-is-identifier/issues
- npm.io page: https://npm.io/package/estree-is-identifier

## Recent versions

- 1.0.0 (latest) — 2018-01-11

## README

# estree-is-identifier

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

[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]

[npm-image]: https://img.shields.io/npm/v/estree-is-identifier.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/estree-is-identifier
[travis-image]: https://img.shields.io/travis/goto-bus-stop/estree-is-identifier.svg?style=flat-square
[travis-url]: https://travis-ci.org/goto-bus-stop/estree-is-identifier
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard

## Install

```
npm install estree-is-identifier
```

## Usage

```js
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](./test.js) 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](LICENSE.md)

---
_Source: https://npm.io/package/estree-is-identifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
