1.0.6 • Published 6 days ago

@teamteanpm2024/incidunt-impedit-atque v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

@teamteanpm2024/incidunt-impedit-atque

npm version Downloads/month Build Status

Constants and utilities about visitor keys to traverse AST.

💿 Installation

Use npm to install.

$ npm install @teamteanpm2024/incidunt-impedit-atque

Requirements

  • Node.js ^18.18.0, ^20.9.0, or >=21.1.0

📖 Usage

To use in an ESM file:

import * as evk from "@teamteanpm2024/incidunt-impedit-atque"

To use in a CommonJS file:

const evk = require("@teamteanpm2024/incidunt-impedit-atque")

evk.KEYS

type: { [type: string]: string[] | undefined }

Visitor keys. This keys are frozen.

This is an object. Keys are the type of ESTree nodes. Their values are an array of property names which have child nodes.

For example:

console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"]

evk.getKeys(node)

type: (node: object) => string[]

Get the visitor keys of a given AST node.

This is similar to Object.keys(node) of ES Standard, but some keys are excluded: parent, leadingComments, trailingComments, and names which start with _.

This will be used to traverse unknown nodes.

For example:

const node = {
    type: "AssignmentExpression",
    left: { type: "Identifier", name: "foo" },
    right: { type: "Literal", value: 0 }
}
console.log(evk.getKeys(node)) // → ["type", "left", "right"]

evk.unionWith(additionalKeys)

type: (additionalKeys: object) => { [type: string]: string[] | undefined }

Make the union set with evk.KEYS and the given keys.

  • The order of keys is, additionalKeys is at first, then evk.KEYS is concatenated after that.
  • It removes duplicated keys as keeping the first one.

For example:

console.log(evk.unionWith({
    MethodDefinition: ["decorators"]
})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... }

📰 Change log

See GitHub releases.

🍻 Contributing

Welcome. See ESLint contribution guidelines.

Development commands

  • npm test runs tests and measures code coverage.
  • npm run lint checks source codes with ESLint.
  • npm run test:open-coverage opens the code coverage report of the previous test with your default browser.
macoscode pointsformattinghttpextraprunefunctionvalidatorviewECMAScript 2020rateidlecommand-lineexit-codedefinePropertyremovestatelessreadablenodeReactiveExtensionsswfWebSocketrmbindmomentpolyfillprotobufjQuerypyyamlreusechromiumargvtoStringTagbundlerdependenciesenvironmentsqsReactiveXspinnerbrowserslistartpopmotionRFC-6455lastform-validationcharacteragentFunction.prototype.nameUint16ArraytypedsetImmediateJSON-SchemaajaxhooksupquerystringloadingtostringtagbyteLengthjsonwalkcloudfrontexpressshrinkwrapwaitrm -rfimportutil.inspectcall-bindbootstrap lessflatMapstartertesterdataviewbytenativedom-testing-librarysetRegExp#flags0es7xtermquotecloudtrailglaciercoredragtapecreatees-abstractvalidtranspilexssarktypesortyupObject.assignIteratorbreaktrimStartframeworktsfiltercss lessdeepclonerfc4122classesjsdomreactpurerapidfigletfpsexpressionreact-testing-libraryrecursiveObject.definePropertyconcatMapeslintconfigweakmapECMAScript 7deepqueueMicrotasksiginttermsettingsUint8ArrayvarmoduleseventsInt16ArrayclassnamesyamltypeofpositivecachePromisehasOwncloudwatchfindjavascriptfindupsignalclass-validatorterminalESminimalmime-dbawslimitedstringifierbabel-coreinspectcallbackanimationlibphonenumbermatchAllPushtestingstructuredClonecolorsmimeES2021emrredactBigUint64ArraytoolkitObject.fromEntriesutilityECMAScript 2017nopemkdirpcurldiffstringifyajvebssymbolsforEachapipackage managertraverseFloat32Arrayclassnameparsingenvcodeselectronworkspace:*assertsObject.entriespostcssHyBiArray.prototype.flatMapprogressfindLastIndexprotocol-buffersAsyncIteratorObject.isstyledebuggermobilepropertyec2es2015Object.valuesworkflowwhichmergethreeserializationreducetrimLeftTypeBoxstyleguideeveryhigher-orderpackagescss nestingcompile lesseslintdayjsfphelperstaketaskcollection.es6visualWebSocketsnpmfetchbannerECMAScript 2015errorproxyaccessorreadablestreamprotormdirpicomatchrgbassignenumerableinterruptseventEmittershebangcalldeterministicchaideletetranspilercryptoECMAScript 5xhrsignalses-shimsfastcloneirqnumberless mixinsendpointfast-copydatastructuremonorepomoduleslotramdaless compilermochasimpledbzeroSymbolextendwebdeepcopyreduxharmonySetwritableArray.prototype.flatfullwidthtextmru3doperating-systemstreamasyncinternalflagsStreamgetOwnPropertyDescriptorlookawesomesaucegetintrinsicwatchingpostcss-pluginmatchesbusylistenersmapstringprettyArrayBuffer.prototype.sliceworkerqsairbnbequalityES2019regular expressionsi18nemitequalfastES2023$.extendtypedarrayurllinuxpasswordpersistentprocesswatchFileArray.prototype.filtermake dirregulargroupruntimefstoArrayreact-hooksnamedatareadECMAScript 2021waapisyntaxsnsRxTypedArraysanitizesetterprivatedirectoryreact poseefficientinstallerconfigurablesigtermecmascriptmkdirasciisomewgetvaluesuninstallprivate datametadata-0dynamodbTypeScriptpathes8utilstoobjecttestlazystylesheetlanguagebluebirdgenericses-shim APIflagl10ntyped arraydescriptionECMAScript 6redux-toolkitassertionparentObservablesestypeerrorArray.prototype.includesspeccloudsearchrdsstableESnextfunctionaljestbootstrap csscolourconstless csseventDispatcherjoisearchmovestreams2
1.0.6

6 days ago

1.0.5

7 days ago

1.0.4

8 days ago

1.0.3

9 days ago

1.0.2

10 days ago

1.0.1

11 days ago

1.0.0

11 days ago