@unified-latex/unified-latex-util-match
TypeScript icon, indicating that this package has built-in type declarations

1.7.1 • Public • Published

unified-latex-util-match

What is this?

Functions to match different Ast.Node types in a unified-latex Abstract Syntax Tree (AST).

When should I use this?

If you need a type-guard to ensure a node is of a certain type; for example, during a call to unified-latex-until-visit.

Install

npm install @unified-latex/unified-latex-util-match

This package contains both esm and commonjs exports. To explicitly access the esm export, import the .js file. To explicitly access the commonjs export, import the .cjs file.

Constants

Name Type Description
match { macro(node: any, macroName?: string): node is Ast.Macro; anyMacro(node: any): node is Ast.Macro; environment(node: any, envName?: string): node is Ast.Environment; anyEnvironment(node: any): node is Ast.Environment; ... 11 more ...; createEnvironmentMatcher: (macros: string[] | Record<...>) => Ast.TypeGuard<...>; } Functions to match different types of nodes.

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @unified-latex/unified-latex-util-match

    Weekly Downloads

    2,008

    Version

    1.7.1

    License

    MIT

    Unpacked Size

    33.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • siefkenj