0.1.3 • Published 3 years ago

@apochromat/print v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@apochromat/print

Dynamic text output for interactive command line apps.

Installation

npm install @apochromat/print --save

Usage

import {Lens} from 'apochromat';
import {print} from '@apochromat/print';

const greeting = new Lens();
const salutation = new Lens();
const subject = new Lens();

print(greeting);
salutation.render`Hi`;
subject.render`everyone`;
greeting.render`${salutation}, ${subject}!`;
setTimeout(() => subject.render`world`, 1000);
setTimeout(() => salutation.render`Hello`, 2000);
Hi, everyone!
Hi, world!
Hello, world!

Types

function print(lens: Lens, stream: WriteStream = process.stdout): () => void;

Copyright 2021 Clemens Akens. All rights reserved. MIT license.

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago