lzc-echo

1.0.9 • Public • Published

echo

NPM version

const echo =require('./index')
const items = {
    String: 'string',
    Number: 123,
    // NaN:NaN, // 同Number
    Boolean: true,
    Date: new Date(),
    Array: Array(10).fill(1).map((v, i) => { return i; }),
    Object: { a: 1, b: { a: 1 }, func: () => { console.log('func') }, c: { a: 1, b: { a: 1 }, methods: () => { console.log('func') } } },
    Null: null,
    Undefined: undefined,
    RegExp: /test/,
    Function: _ => { console.log('asdf') }
}
 
echo.magenta('types')
for (let val of Object.values(items)) {
    echo.log(val)
}
 
echo.magenta('methods')
// err,error,succ,success,info,bold,italic,underline,inverse,strikethrough,white,grey,black,blue,cyan,green,magenta,red,yellow,whiteBG,greyBG,blackBG,blueBG,cyanBG,greenBG,magentaBG,redBG,yellowBG
echo.log(Object.keys(echo).join(','))
for (let [key,val] of Object.entries(echo)) {
    echo[key](key,' - ',val)
}

Readme

Keywords

none

Package Sidebar

Install

npm i lzc-echo

Weekly Downloads

2

Version

1.0.9

License

MIT

Unpacked Size

8.13 kB

Total Files

7

Last publish

Collaborators

  • zc.lee