npm.io
0.10.1 • Published 1 month ago

@lionweb/utilities

Licence
Apache-2.0
Version
0.10.1
Deps
6
Size
223 kB
Vulns
0
Weekly
0
Stars
12

The utilities package

license CI npm

This NPM package can be added to a TypeScript codebase as follows:

$ npm add @lionweb/utilities

It contains utilities on top of the core package, such as:

  • Diagram generation (PlantUML and Mermaid) from an M2.
  • “Textualization”, i.e. render a serialization chunk as text.
  • Sort the contents of a serialization chunk as much as possible, for the sake of comparing serialization chunks.
  • Compute metrics for a serialization chunk (also relative to a given M2).
  • Infer a (partial) M2 from a serialization chunk.
  • Generation of TypeScript type definitions from an M2.

Note that this package implicitly relies on Node.js, so effectively on the @types/node package, without stating that explicitly as a (production) dependency in package.json. This enables using this package in browsers, as long as you don’t use the readFileAsJson and writeJsonAsFile functions.

Development

Build it from source as follows:

npm run build