Nanometer Process Machine

    xa
    TypeScript icon, indicating that this package has built-in type declarations

    2.4.0 • Public • Published

    xa

    Simple console logger, that works in Node.js, Electron and the Browser :heart:

    Build Status XO Code Style Unicorn

    Screenshot


    Highlights

    • Simple API
    • Works in Node.js, Electron and the Browser
    • Customizable
    • Written in TypeScript

    Install

    npm install xa
    

    Usage

    const xa = require('xa');
     
    xa.success('Build finished!');
    xa.custom('TITLE', 'Nice description', {titleColor: 'yellow', backgroundColor: '#212121'});

    API

    xa

    Main method

    success(text)

    text

    Type: string

    A text you want to display

    info(text)

    text

    Type: string

    A text you want to display

    warning(text)

    text

    Type: string

    A text you want to display

    error(text)

    text

    Type: string

    A text you want to display

    custom(title, text, {titleColor, backgroundColor})

    title

    Type: string

    Title of the log. When in Electron, the title will be either MAIN or RENDERER.

    text

    Type: string

    A text you want to display

    titleColor

    Type: string Default: white

    Color of the title. It will be converted to HEX.

    backgroundColor

    Type: string Default: black

    Color of title's background. It will be converted to HEX.

    Thanks:

    License

    MIT © Antoni Kepinski

    Keywords

    none

    Install

    npm i xa

    DownloadsWeekly Downloads

    41

    Version

    2.4.0

    License

    MIT

    Unpacked Size

    6.88 kB

    Total Files

    5

    Last publish

    Collaborators

    • akepinski