xa
xa copied to clipboard
Beautiful & Customizable logger :heart:
xa
Simple console logger, that works in Node.js, Electron and the Browser :heart:
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:
- Jamen Marzonie for providing package name!
License
MIT © Antoni Kepinski