1.0.0 • Published 2 years ago
recolors v1.0.0
recolors
picocolors
alternative as a module!
import { green, italic } from 'recolors'
console.log(
green(`How are ${italic(`you`)} doing?`)
)
Or alternatively:
import * as nc from 'recolors'
console.log(
nc.green(`How are ${nc.italic(`you`)} doing?`)
)
There are no default exports!
Why
When embedding picocolors
, you say goodbye to the tree shaking, this library is designed to be embedded instead, unused colors are removed from the final bundle.
Difference with picocolors
- ES Module instead of CommonJS
- Better typings!
picocolors.isColorSupported
isCOLORS_SUPPORTED
import { COLORS_SUPPORTED } from 'recolors'
- There are no default exports! You need to use
import { red } from 'recolors'
orimport * as nc from 'recolors'
1.0.0
2 years ago