colortags
v0.0.1
Published
colors.js alternative, built with tags.
Downloads
3
Readme
colortag`colors.js alternative, built with tags.`;
Get colors inside your console.log, with special feature to use tag from javascript.
Installation
npm install colortag
Usage
Without tag :
import { red } from "colortags";
console.log(
red(
`You can modify the query string to include fields that you want to be included or not. Refer to the GraphQL Schema below for a full overview.`
)
);
With tag :
import { red } from "colortags";
try {
// function that throws error
} catch (e) {
red`Something wrong with your relationship`;
}
Using tag will give side effect which is will automically execute with console.log.
:warning: Becareful while using tag, because in the core it will iterate over your given string (basically that's how javascript tag template literal works). Use it for debug purpose only. Not CLI apps, etc.
License
This open source is licensed under ISC.