@jvalue/jayvee-interpreter-lib
TypeScript icon, indicating that this package has built-in type declarations

0.6.2 • Public • Published

Jayvee interpreter Library

This library can be used to interpret a Jayvee model. For example, the interpreter app uses this library after parsing the command line input.

Example Usage

For interpreting a string, you can simply use the method

interpretString(
  modelString,  // string
  options,      // RunOptions
)

If you want to interpret anything else, you need to define a function that instantiates the JayveeModel, e.g., from a file:

const extractAstNodeFn = async (
    services: JayveeServices,
    loggerFactory: LoggerFactory,
  ) =>
    await extractAstNodeFromFile<JayveeModel>(
        fileName,
        services,
        loggerFactory.createLogger(),
    );
const exitCode = await interpretModel(extractAstNodeFn, options);

Building

Run nx build interpreter-lib to build the library.

Running unit tests

Run nx test interpreter-lib to execute the unit tests via vitest.

Readme

Keywords

none

Package Sidebar

Install

npm i @jvalue/jayvee-interpreter-lib

Weekly Downloads

75

Version

0.6.2

License

none

Unpacked Size

321 kB

Total Files

241

Last publish

Collaborators

  • joluj
  • rhazn
  • georg-schwarz
  • dirkriehle