https://github.com/xxczaki/xa
Beautiful & Customizable logger :heart:
https://github.com/xxczaki/xa
beautiful chalk cli color javascript log log-message message nodejs npm package simple terminal xa
Last synced: 27 days ago
JSON representation
Beautiful & Customizable logger :heart:
- Host: GitHub
- URL: https://github.com/xxczaki/xa
- Owner: xxczaki
- License: mit
- Created: 2018-01-13T15:26:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T21:38:37.000Z (about 4 years ago)
- Last Synced: 2025-04-08T22:07:00.957Z (29 days ago)
- Topics: beautiful, chalk, cli, color, javascript, log, log-message, message, nodejs, npm, package, simple, terminal, xa
- Language: TypeScript
- Homepage: https://npmjs.com/package/xa
- Size: 828 KB
- Stars: 84
- Watchers: 2
- Forks: 9
- Open Issues: 8
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
README
![]()
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
```js
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](https://www.npmjs.com/~jamen) for providing package name!
## License
MIT © [Antoni Kepinski](https://kepinski.me)