0.0.6 • Published 7 years ago

inferno-log v0.0.6

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

inferno-log

仅仅是对chalk进行的简单封装,用于修改控制台打印文字样式

1、参数定义,v0.0.1版本暂不支持传入除以下参数外的参数,参数后加*的为默认参数

modifier
reset* | bold | dim | italic | underline | inverse | hidden | strikethrough
color
black | red | green | yellow | blue | magenta | cyan | white* | gray
background
bgBlack* | bgRed | bgGreen | bgYellow | bgBlue | bgMagenta | bgCyan | bgWhite

2、调用方式

1)、只传入部分参数,参数传入顺序自定

const infernoLog = require('inferno-log');

infernoLog('Use "inferno-log" successfully!', {
    color: 'green',
})

2)、传入完整参数,参数传入顺序自定

const infernoLog = require('inferno-log');

infernoLog('Use "inferno-log" successfully!', {
    modifier: 'bold',
    color: 'green',
    background: 'bgWhite',
})