ansis
4.5.0 · 1 Nov 2026ISC56.7M / weekRepositoryHomepagenpmAtom feed
1.5.6 is the newest release of 1.x.
In short
7 new3 fixed1 internal
Release note
Cumulative Release v1.3.0 - v1.5.5
Features
Added support for nested template literal syntax:
console.log(red`red ${yellow`yellow ${green`green`} yellow`} red`)Added named export of colors with support for chained syntax:
import { red, green, yellow } from 'ansis/colors'; console.log(red.bold.underline`text`);Added extending of base colors with named custom truecolor:
import ansis from 'ansis'; ansis.extend({ orange: '#FFAB40' }); console.log(ansis.orange.bold('text'));Added the
strip()method to remove all ANSI codes from stringAdded support for both CommonJS and ESM
Added aliases:
.fg()for.ansi256()and.bg()for.bgAnsi256()methodsOptimized distributed code size to less than
4 KB.
Bug Fixes
Fixed
visiblestyle with nested template stringsSet correct aliases for
bgAnsiandfgmethods by named exportRegard the value of the environment variable
FORCE_COLOR=0to force disable colors