get-assigned-identifiers

WebJar for get-assigned-identifiers

License

License

Categories

Categories

IDE Development Tools
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

get-assigned-identifiers
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

get-assigned-identifiers
WebJar for get-assigned-identifiers
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/goto-bus-stop/get-assigned-identifiers

Download get-assigned-identifiers

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/get-assigned-identifiers/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>get-assigned-identifiers</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/get-assigned-identifiers/
implementation 'org.webjars.npm:get-assigned-identifiers:1.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/get-assigned-identifiers/
implementation ("org.webjars.npm:get-assigned-identifiers:1.2.0")
'org.webjars.npm:get-assigned-identifiers:jar:1.2.0'
<dependency org="org.webjars.npm" name="get-assigned-identifiers" rev="1.2.0">
  <artifact name="get-assigned-identifiers" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='get-assigned-identifiers', version='1.2.0')
)
libraryDependencies += "org.webjars.npm" % "get-assigned-identifiers" % "1.2.0"
[org.webjars.npm/get-assigned-identifiers "1.2.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

get-assigned-identifiers

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

npm travis standard

Install

npm install get-assigned-identifiers

Usage

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

Versions

Version
1.2.0