undeclared-identifiers

WebJar for undeclared-identifiers

License

License

Categories

Categories

IDE Development Tools
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

undeclared-identifiers
Last Version

Last Version

1.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

undeclared-identifiers
WebJar for undeclared-identifiers
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/goto-bus-stop/undeclared-identifiers

Download undeclared-identifiers

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
org.webjars.npm : acorn-node jar [1.3.0,2)
org.webjars.npm : simple-concat jar [1.0.0,2)
org.webjars.npm : xtend jar [4.0.1,5)
org.webjars.npm : dash-ast jar [1.0.0,2)
org.webjars.npm : get-assigned-identifiers jar [1.2.0,2)

Project Modules

There are no modules declared in this project.

undeclared-identifiers

find undeclared identifiers and property accesses in a javascript file.

npm travis standard

Install

npm install undeclared-identifiers

Usage

var undeclaredIdentifiers = require('undeclared-identifiers')

undeclaredIdentifiers(src)
// { identifiers: ['Buffer'],
//   properties: ['Buffer.isBuffer'] }

API

res = undeclaredIdentifiers(source, opts)

Find undeclared identifiers and properties that are used in the source. source can be an AST or a source string that will be parsed using acorn-node.

res is an object with properties:

  • res.identifiers - an array of variable names as strings.
  • res.properties - an array of property names as .-separated strings, such as 'xyz.abc'. These are the property accesses on the undeclared variables found in res.identifiers.

Set opts.properties to false to only return identifiers.

When opts.wildcard is true, unknown uses of undeclared identifiers will be added to res.properties as 'VarName.*'.

undeclaredIdentifiers('Buffer(), Buffer.from()', { wildcard: true })
// { identifiers: ['Buffer'],
//   properties: ['Buffer.*', 'Buffer.from'] }

License

Apache-2.0

Versions

Version
1.1.3
1.1.2