โคNTFS Path Mockery

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

    5.0.1ย โ€ขย 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://esm.sh/@vangware/ansi";
    
    foregroundRed`Hello world!`;

    ๐ŸŒŽ Or in the browser:

    <script type="module">
    	import { foregroundRed } from "https://esm.sh/@vangware/ansi";
    
    	foregroundRed`Hello world!`;
    </script>

    Usage with local installation

    First:

    # If you use npm
    npm install @vangware/ansi
    # If you use pnpm
    pnpm add @vangware/ansi
    # If you use yarn
    yarn add @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 is available HERE. It is auto-generated with typedoc based on the JSDocs and the types in the source. It shouldn't be necessary to read this. Code editors like VS Code integrate the documentation in the UI.

    Changelog

    Changelog can be found HERE.

    Test coverage

    Test coverage can be found HERE.

    Tip: Click on a version number to view a previous version's package page

    Current Tags

    • Version
      Downloads (Last 7 Days)
      • Tag
    • 5.0.1
      69
      • latest

    Version History

    Install

    npm i @vangware/ansi

    DownloadsWeekly Downloads

    428

    Version

    5.0.1

    License

    MIT

    Unpacked Size

    60.8 kB

    Total Files

    97

    Last publish

    Collaborators

    • lukeshiru