1.7.0 • Published 4 years ago
unicorn.log v1.7.0
❤️ it? ⭐️ it on GitHub or Tweet about it.
Art by Colin J. Randall
\
\
\\
\\
>\/7
_.-(6' \
(=___._/` \
) \ |
/ / |
/ > /
j < _\
_.-' : ``.
\ r=._\ `.
<`\\_ \ .`-.
\ r-7 `-. ._ ' . `\
\`, `-.`7 7) )
\/ \| \' / `-._
|| .'
\\ (
>\ >
,.-' >.'
<.'_.''
<'
Table of Contents
Installation
Ensure you have Node.js 10 or later installed. Then run the following:
# npm
npm install unicorn.log
# yarn
yarn add unicorn.log
Usage
# commonjs
require('unicorn.log');
# js or ts
import 'unicorn.log';
# Logging
> console.unicorn(null);
> console.unicorn(undefined);
> console.unicorn('hello world');
> console.unicorn({hello: 'world'});
> console.unicorn(new Error('hello world'));
> console.unicorn(new TypeError('hello world'));
> console.unicorn(chalk.bold.red(`✖ hello world`), 35); # with chalk & line limiting
Browser Node
Issues
Looking to contribute? Look for the Good First Issue label.
🐛 Bugs
Please file an issue here for bugs, missing documentation, or unexpected behavior.
Linting & TypeScript Config
- Shared Eslint & Prettier Configuration -
@abhijithvijayan/eslint-config
- Shared TypeScript Configuration -
@abhijithvijayan/tsconfig
Credits
This is sort of a fork of this idea by wesbos
License
MIT © Abhijith Vijayan