2.0.1 • Published 5 years ago

@xtx1130/tb-log v2.0.1

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

tb-log

A simple log for node cli

Build Status Coverage Status

pic

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)

args0 <String> The name will show on the tty
args1 <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