Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 27, 2024 via pnpm

eslint-visitor-keys 3.4.3

Constants and utilities about visitor keys to traverse AST.
Package summary
Share
0
issues
1
license
1
Apache-2.0
Package created
17 Nov 2017
Version published
11 Aug 2023
Maintainers
2
Total deps
1
Direct deps
0
License
Apache-2.0

Issues

0
This package has no issues

Licenses

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
eslint-visitor-keys@3.4.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of eslint-visitor-keys 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does eslint-visitor-keys do?

The eslint-visitor-keys is a handy npm package that provides constants and utilities for working with visitor keys in order to traverse Abstract Syntax Trees (AST). It brings you an efficient way to handle and traverse any ESTree nodes in your JavaScript codebase, making code analysis and syntax parsing tasks a breeze.

How do you use eslint-visitor-keys?

Using eslint-visitor-keys is relatively straightforward. After installing it with npm using npm install eslint-visitor-keys, you can import it in your project as follows:

If you're using ESM (ECMAScript modules), the import code looks like this:

import * as evk from "eslint-visitor-keys"

For a CommonJS-based project, use the require statement to import eslint-visitor-keys::

const evk = require("eslint-visitor-keys")

Once imported, you have access to features such as evk.KEYS, which allows you to print property names of child nodes:

console.log(evk.KEYS.AssignmentExpression) // β†’ ["left", "right"]

In addition, you can also make use of the evk.getKeys(node) function to fetch the visitor keys of an AST node. Moreover, you can use evk.unionWith(additionalKeys) to make a union set with evk.KEYS and your defined keys.

Where are the eslint-visitor-keys docs?

The documentation for eslint-visitor-keys is available directly in the readme on its GitHub repo (https://github.com/eslint/eslint-visitor-keys), which details key features and usage instructions. The accompanying examples illustrate how to utilize its APIs effectively. Considering the package serves as a utility for AST node traversal, familiarity with AST and ESTree might be helpful for better comprehension of the docs.