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

1.8.0 • Public • Published

unified-latex-util-packages

What is this?

Functions for reporting on imported packages in a unified-latex Abstract Syntax Tree (AST).

When should I use this?

If you are building a linter or some other system that needs to know which packages have been included via \usepackage{...} or \RequirePackage{...}.

Install

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

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.

Functions

listPackages(tree)

List all packages referenced via \includepackage{...} or \RequirePackage{...}

function listPackages(tree: Ast.Ast): Ast.String[];

Parameters

Param Type
tree Ast.Ast

Package Sidebar

Install

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

Weekly Downloads

10

Version

1.8.0

License

MIT

Unpacked Size

17.2 kB

Total Files

7

Last publish

Collaborators

  • siefkenj