Dynamic text output for interactive command line apps.
npm install @apochromat/print[![][ci-badge]][ci-link] [![][version-badge]][version-link]
[![][license-badge]][license-link]
[ci-badge]: https://github.com/clebert/apochromat-print/workflows/CI/badge.svg
[ci-link]: https://github.com/clebert/apochromat-print
[version-badge]: https://badgen.net/npm/v/@apochromat/print
[version-link]: https://www.npmjs.com/package/@apochromat/print
[license-badge]: https://badgen.net/npm/license/@apochromat/print
[license-link]:
https://github.com/clebert/apochromat-print/blob/master/LICENSE.md
Dynamic text output for interactive command line apps.
```
npm install @apochromat/print --save
`js
import {Lens} from 'apochromat';
import {print} from '@apochromat/print';
const greeting = new Lens();
const salutation = new Lens();
const subject = new Lens();
print(greeting);
salutation.renderHi;everyone
subject.render;${salutation}, ${subject}!
greeting.render;world
setTimeout(() => subject.render, 1000);Hello
setTimeout(() => salutation.render, 2000);`
``
Hi, everyone!
``
Hi, world!
``
Hello, world!
`ts``
function print(lens: Lens, stream: WriteStream = process.stdout): () => void;
---
Copyright 2021 Clemens Akens. All rights reserved.
MIT license.