@vangware/ansi
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.9Β β€’Β PublicΒ β€’Β Published

    Vangware's ANSI logo

    Build Status Coverage License NPM Version Open Issues

    πŸ“Ÿ Functional CLI ANSI formatter.

    Usage

    This package can be installed as a dependency or used directly.

    Usage as ECMAScript module

    πŸ¦• In JS or deno:

    import { foregroundRed } from "https://cdn.skypack.dev/@vangware/ansi";
    
    foregroundRed("Hello world!");

    🌎 Or in the browser:

    <script type="module">
    	import { foregroundRed } from "https://cdn.skypack.dev/@vangware/ansi";
    
    	foregroundRed("Hello world!");
    </script>

    Usage with local installation

    First:

    npm i @vangware/ansi

    And then:

    import { whiteText, redBackground, bold, mix } from "@vangware/ansi";
    
    // You can just use the styles
    console.log(redBackground("Red background text"));
    
    // Or you can mix them!
    const warningText = mix([whiteText, redBackground, bold]);
    
    console.log(warningText("Warning!"));

    Documentation

    Documentation can be found HERE. It is auto-generated with typedoc based on the JSDocs and the types in the source. Shouldn't be necessary to read this, code editors like VSCode integrate the documentation in the UI.

    Changelog

    Changelog can be found HERE.

    Test coverage

    Test coverage can be found HERE.

    Install

    npm i @vangware/ansi

    DownloadsWeekly Downloads

    26

    Version

    2.0.9

    License

    MIT

    Unpacked Size

    101 kB

    Total Files

    191

    Last publish

    Collaborators

    • lukeshiru