@emersonbraun/pretty-log

1.3.1 • Public • Published

Pretty Log

Get beautiful consoles easily

PrettyLog PrettyLog PrettyLog PrettyLog PrettyLog PrettyLog PrettyLog PrettyLog PrettyLog PrettyLog

Prerequisites

Installing

Using NPM

npm i @emersonbraun/pretty-log

OR Yarn

yarn add @emersonbraun/pretty-log

Usage

import package

import PrettyLog from '@emersonbraun/pretty-log' //es6
var PrettyLog = require('@emersonbraun/pretty-log').default // old form 

Type Info

PrettyLog.info('test info')

Output: PrettyLog
Type Info (with var)

const hello = 'hello word'
PrettyLog.info('test info', hello)

Output: PrettyLog
Type success

PrettyLog.success('teste success')

Output: PrettyLog
Type success (with var)

const hello = 'hello word'
PrettyLog.success('teste success', hello)

Output: PrettyLog
Type warn

PrettyLog.warn('teste warn')

Output: PrettyLog
Type warn (with var)

const hello = 'hello word'
PrettyLog.warn('teste warn', hello)

Output: PrettyLog
Type error

PrettyLog.error('teste error')

Output: PrettyLog
Type error (with var)

const hello = 'hello word'
PrettyLog.error('teste error', hello)

Output: PrettyLog
Type custom

pass options

Name Value Obs
icon 'cross', 'tick', ... Options in figures
iconColor 'red', 'blue', ... Options in chalk
title string Any text
titleColor 'red', 'blue', ... Options in chalk
PrettyLog.custom('teste custom', null, {
  iconColor: 'white',
  icon: 'bullet',
})

Output PrettyLog
Type custom (with var)

const hello = 'hello word'
PrettyLog.custom('teste custom', hello, {
  iconColor: 'white',
  icon: 'bullet',
})

Output: PrettyLog

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Author

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Package Sidebar

Install

npm i @emersonbraun/pretty-log

Weekly Downloads

7

Version

1.3.1

License

MIT

Unpacked Size

12.8 kB

Total Files

5

Last publish

Collaborators

  • emersonbraun