Options
All
  • Public
  • Public/Protected
  • All
Menu

@thi.ng/text-format

text-format

npm versionnpm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

Customizable color text formatting with presets for ANSI & HTML.

Status

STABLE - used in production

Search or submit any issues for this package

Related packages

  • @thi.ng/text-canvas - Text based canvas, drawing, tables with arbitrary formatting (incl. ANSI/HTML)

Installation

yarn add @thi.ng/text-format

ES module import:

<script type="module" src="https://cdn.skypack.dev/@thi.ng/text-format"></script>

Skypack documentation

For NodeJS (v14.6+):

node --experimental-specifier-resolution=node --experimental-repl-await

> const textFormat = await import("@thi.ng/text-format");

Package sizes (gzipped, pre-treeshake): ESM: 1.46 KB

Dependencies

Usage examples

Several demos in this repo's /examples directory are using this package.

A selection:

ScreenshotDescriptionLive demoSource
3D wireframe textmode demoDemoSource
Textmode image warping w/ 16bit color outputDemoSource

API

Generated API docs

TODO

Authors

Karsten Schmidt

If this project contributes to an academic publication, please cite it as:

@misc{thing-text-format,
  title = "@thi.ng/text-format",
  author = "Karsten Schmidt",
  note = "https://thi.ng/text-format",
  year = 2020
}

License

© 2020 - 2021 Karsten Schmidt // Apache Software License 2.0

Generated using TypeDoc