Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 776 Bytes

README.md

File metadata and controls

43 lines (31 loc) · 776 Bytes

Consome = Console + Awesome 🙌

Add a logAt(index, message) function to your NodeJS console.

Install

yarn add -D consome

or

npm i -save-dev consome

Basic Usage

require('consome');
console.logAt(0, 'logging something at line 0');
console.logAt(2, 'logging something at line 2');

Demo

Let's implement a dynamic terminal loader:

require('consome');

console.log('----- Demo -----');

const loadingLine = console.log('Loading');
setInterval(() => {
  console.logAt(loadingLine, `Loading ${loader.next()}`)
}, 500);

console.log('----- Fin -----');

Result

License

Unless otherwise specified this project is licensed under Apache License Version 2.0.