New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ansis

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansis - npm Package Versions

13
8

3.12.0

Diff

Changelog

Source

3.12.0 (2025-02-11)

  • feat: add support for \n as a newline in template literals, e.g.: green`Hello\nWorld` renders:
    Hello
    World
    
webdiscus
published 3.11.0 •

Changelog

Source

3.11.0 (2025-02-09)

  • feat: add support for legacy Node.js v14 (in package.json for npm was changed the engines to "node": ">=14")
  • test: add test in GitHub workflow for legacy Node.js versions: 14, 16
  • chore: update dev dependencies
webdiscus
published 3.10.0 •

Changelog

Source

3.10.0 (2025-01-27)

  • feat: ansis.reset() returns the reset escape code \e[0m
  • feat: micro optimisations for slight performance improvements
  • chore: code cleanup
  • docs: update readme
webdiscus
published 3.9.0 •

Changelog

Source

3.9.0 (2025-01-13)

  • feat: revert handling of null and undefined values to empty string as before v3.7.0, #25
webdiscus
published 3.8.1 •

Changelog

Source

3.8.1 (2025-01-10)

  • refactor: optimize package size
webdiscus
published 3.8.0 •

Changelog

Source

3.8.0 (2025-01-09)

  • feat: enforce a specific color support by a FORCE_COLOR value: false - Disables colors 0 - Disables colors true (or unset) - Auto detects the supported colors (if no color detected, enforce truecolor) 1 - Enables 16 colors 2 - Enables 256 colors 3 - Enables truecolor

  • fix: if the function argument is an empty string should be returned an empty string w/o escape codes:

    ansis.red('') => '', w/o escape codes
    
  • refactor: optimize code by size

webdiscus
published 3.7.0 •

Changelog

Source

3.7.0 (2025-01-07)

  • fix: cast falsy values false, null, undefined, NaN to a string. In previous versions, the empty string '' was returned for falsy values.
  • fix: functions with argument 0 , e.g. ansis.red(0), returning empty string '', now return colored value '0'
  • test: add tests for function arguments with various types
webdiscus
published 3.6.0 •

Changelog

Source

3.6.0 (2025-01-04)

  • feat: remove undocumented pointless dummy function ansis(any)

    [!WARNING] This is not a BREAKING CHANGE because it was never officially documented!

    import ansis from 'ansis';
    ansis('text'); <= now will occur the ERROR TS2349: This expression is not callable.
    

    This warning applies only to projects where Chalk was replaced with Ansis and something like chalk('text') was used.

    Just replace ansis('text') with 'text'.

    The ansis('text') function was a dummy and did nothing except return the same input string.

  • chore: update license to current date

webdiscus
published 3.5.2 •

Changelog

Source

3.5.2 (2024-12-28)

  • fix: TS2339: Property 'strip' does not exist on type when the TS compiler option module is node16
  • refactor: optimize index.d.ts to reduce package size from 7.3 kB to 7.0 kB
webdiscus
published 3.5.1 •

Changelog

Source

3.5.1 (2024-12-26)

  • refactor: invisible code optimisation
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc