inkling-loader
v0.1.5
Published
Reveal ASCII art as a progress indicator, from Node, on the inkling engine.
Maintainers
Readme
inkling (Node)
Reveal ASCII art as a progress indicator, from Node. The same Rust core as the inkling crate, compiled to a native addon with napi-rs.

npm install inkling-loaderconst { Loader } = require("inkling-loader");
const bar = new Loader({ total: items.length, rainbow: true });
for (const item of items) {
work(item);
bar.inc();
}
bar.finish();| Method | Effect |
| --- | --- |
| inc(delta = 1) | advance the position |
| set(pos) | set the absolute position |
| setLength(total) | change the total |
| setMessage(text) | caption beneath the art |
| finish() / finishAndClear() | finish, keeping or erasing the art |
Constructor options: total, art, artPath, rainbow, geodesic, reading, message.
Building
npm install
npm run build # produces the native .node addon plus index.js / index.d.tsThe inkling family
This is the Node package. The same engine ships five ways:
inkling-loaderon npm (this package), for Node.npm install inkling-loader.inkling-loaderon crates.io, the Rust library.cargo add inkling-loader.inkling-loaderon PyPI, the Python package.pip install inkling-loader.inkling-cli, theinklingcommand, to drive a reveal from any language through a pipe.inkling-wasmon npm, the WebAssembly build for the browser.
Built from the inkling Rust core. License: MIT.
