typelog: 为你的 console.log 加上 emoji 和 type

1,755 阅读1分钟

JavaScript

README.md

Imagine logging everything in your console with a type.

preview

Usage

For node >= 4.0.0

const log = require('log')

log.info('I\'m some information', 'hah?')
log.error('You did something that wrong')
log.warn('Please do not hate me')
log.success('You finally got that girlfriend')

// alternatives
log('info', 'write type inside function', 'is ok', 'too')

// do not show type, it's ugly
log('only content and a lovely emoji')

License

MIT.