# @lionweb/utilities

> LionWeb utilities

Latest version **0.10.1** (published 2026-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @lionweb/utilities
pnpm add @lionweb/utilities
yarn add @lionweb/utilities
bun add @lionweb/utilities
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.1 |
| Published | 2026-09-22 |
| First published | 2023-09-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 223.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Maintainers | dslmeinte, ftomassetti, jwarmer |

## Links

- npm: https://www.npmjs.com/package/@lionweb/utilities
- Repository: https://github.com/LionWeb-io/lionweb-typescript
- Homepage: https://github.com/LionWeb-io/lionweb-typescript#readme
- Issues: https://github.com/LionWeb-io/lionweb-typescript/issues
- npm.io page: https://npm.io/package/@lionweb/utilities

## Dependencies (6)

- [nanoid](https://npm.io/package/nanoid.md) 5.1.16
- [@lionweb/core](https://npm.io/package/@lionweb/core.md) 0.10.1
- [@lionweb/json](https://npm.io/package/@lionweb/json.md) 0.10.1
- [@lionweb/ts-utils](https://npm.io/package/@lionweb/ts-utils.md) 0.10.1
- [littoral-templates](https://npm.io/package/littoral-templates.md) 0.5.1
- [@lionweb/textgen-utils](https://npm.io/package/@lionweb/textgen-utils.md) 0.10.1

## Recent versions

- 0.10.1 (latest) — 2026-09-22
- 0.11.0-alpha.0 (alpha) — 2026-10-15
- 0.10.0-beta.8 (beta) — 2026-09-07
- 0.10.0 — 2026-09-11
- 0.10.0-beta.7 — 2026-08-28
- 0.10.0-beta.6 — 2026-08-27
- 0.10.0-alpha.11 — 2026-08-23
- 0.10.0-alpha.10 — 2026-07-27
- 0.10.0-beta.5 — 2026-07-27
- 0.10.0-beta.4 — 2026-07-23
- 0.10.0-beta.3 — 2026-07-20
- 0.10.0-alpha.9 — 2026-07-20
- 0.10.0-alpha.8 — 2026-07-20
- 0.10.0-alpha.7 — 2026-07-15
- 0.10.0-beta.2 — 2026-07-13
- … 129 more at https://npm.io/package/@lionweb/utilities/versions

## README

# The `utilities` package

[![license](https://img.shields.io/badge/License-Apache%202.0-green.svg?style=flat)
](./LICENSE)
[![CI](https://github.com/LionWeb-io/lionweb-typescript/actions/workflows/test.yaml/badge.svg)
](https://github.com/LionWeb-io/lionweb-typescript/actions/workflows/test.yaml)
[![npm](https://img.shields.io/npm/v/%40lionweb%2Futilities?label=%40lionweb%2Futilities)
](https://www.npmjs.com/package/@lionweb/utilities)

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

```shell
$ 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:

```shell
npm run build
```

---
_Source: https://npm.io/package/@lionweb/utilities · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
