Skip to content

xxczaki/xa

Repository files navigation

xa

Simple console logger, that works in Node.js, Electron and the Browser ❤️

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