Skip to content

Latest commit

 

History

History

text-format

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

text-format

npm version npm 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 Node.js REPL:

# with flag only for < v16
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:

Screenshot Description Live demo Source
3D wireframe textmode demo Demo Source
Textmode image warping w/ 16bit color output Demo Source

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