Skip to content
Web App

Legacy

Frozen 0.3.0 Block/Table pipeline, exposed as the @json-table/core/legacy submodule. Prefer the root API for new code.

Terminal window
npm i @json-table/core

No extra dependencies — it ships inside @json-table/core.

import {
makeTableFactory,
makeBlockFactory,
blockToASCII,
blockToHTML,
} from "@json-table/core/legacy";
const bake = makeBlockFactory({
cornerCellValue: "№",
});
const asciiTable = blockToASCII(bake(data));
/* Or */
const htmlTable = blockToHTML(bake(data));

The single entry point mirrors the 0.3.0 export surface: the root model (Block, Table, Cell, CellType, …) plus the block, block-matrix, block-to-ascii, block-to-html and json-to-table modules. Unlike the current API, there is no emptyCellValue option — empty arrays and objects render as empty strings.

MIT