@xtx1130/tb-log
v2.0.1
Published
colorful log for info/success/error/start/warn
Downloads
12
Readme
tb-log
A simple log for node cli
Install
$ npm install @xtx1130/tb-log
Usage
const log = require('@xtx1130/tb-log') // will use the defalut name: tb
log.warn('test')
or
const Log = require('@xtx1130/tb-log').Log
const log = new Log('name', true)
log.success('test')
API
class Log
const Log = require('@xtx1130/tb-log').Log
const log = new Log('name', true)
args[0] <String> The name will show on the tty
args[1] <Boolean> Async console or not(sync console,use fs.writeSync)
log.error(str)/success/info/start/warn/default
log.error('test')
log.clear()
log.clear()
clear ttys
License
MIT