# get-assigned-identifiers

> get a list of identifiers that are initialised by a JavaScript AST node.

Latest version **1.2.0** (published 2018-02-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install get-assigned-identifiers
pnpm add get-assigned-identifiers
yarn add get-assigned-identifiers
bun add get-assigned-identifiers
```

## 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.2.0 |
| Published | 2018-02-08 |
| First published | 2017-11-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Renée Kooi |
| Maintainers | goto-bus-stop |
| Keywords | ast, bindings, destructuring, identifiers, javascript, names, node |

## Links

- npm: https://www.npmjs.com/package/get-assigned-identifiers
- Repository: https://github.com/goto-bus-stop/get-assigned-identifiers
- Issues: https://github.com/goto-bus-stop/get-assigned-identifiers/issues
- npm.io page: https://npm.io/package/get-assigned-identifiers

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2018-02-08
- 1.1.0 — 2017-12-02
- 1.0.0 — 2017-11-11

## README

# get-assigned-identifiers

get a list of identifiers that are initialised by a JavaScript AST node.

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

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

## Install

```
npm install get-assigned-identifiers
```

## Usage

```js
var getAssignedIdentifiers = require('get-assigned-identifiers')

var ast = parse(`
  var { a, b: [ c,, ...x ], d } = whatever()
`)
var node = ast.body[0].declarations[0].id
getAssignedIdentifiers(node)
// → [{ name: 'a' }, { name: 'c' }, { name: 'x' }, { name: 'd' }]
```

## API

### `getAssignedIdentifiers(node)`

Return an array of AST Nodes referencing identifiers that are initialised by the `node`, taking into account destructuring.

If `node` is not an identifier or destructuring node, this returns an empty array.

## License

[Apache-2.0](LICENSE.md)

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