@nhtio/adk/batteries/media/engines/data
The deterministic text/data @nhtio/adk/batteries/media/contracts!MediaEngine: seeds and conversions for the text-shaped family (txt/md/json/yaml/csv/html).
Remarks
The smallest engine in the fleet, and deliberately so: text-family media generation is a literal ('', '{}', a minimal HTML shell) and text-family conversion is a parse and a re-serialize. Everything here is deterministic — same inputs, same bytes — and cross-env (no node:* anywhere).
Capabilities:
- generate:
EMPTY_MIME→ txt, md, json, yaml, csv, html. - convert: json ⇄ yaml (js-yaml), json ⇄ csv (papaparse), json → txt (pretty print).
papaparse is an optional peer (lazily imported only for the csv edges); js-yaml is a regular dependency of the library.
Interfaces
| Interface | Description |
|---|---|
| DataEngineOptions | Options for dataEngine. |
Functions
| Function | Description |
|---|---|
| dataEngine | Construct the deterministic text/data engine. |