Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fetchte/colur
A kool colur logger
https://github.com/fetchte/colur
Last synced: about 1 month ago
JSON representation
A kool colur logger
- Host: GitHub
- URL: https://github.com/fetchte/colur
- Owner: fetchTe
- License: mit
- Created: 2016-10-11T04:27:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T04:46:29.000Z (about 7 years ago)
- Last Synced: 2024-11-06T23:22:39.610Z (about 2 months ago)
- Language: JavaScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# colur: a kool logger
[![license](http://img.shields.io/badge/license-mit-3498db.svg)](https://github.com/artisin/colur/blob/master/LICENSE)
[![wercker status](https://app.wercker.com/status/a432f5dddbb23e0ee1680892b3f511ef/s/master "wercker status")](https://app.wercker.com/project/byKey/a432f5dddbb23e0ee1680892b3f511ef)
[![npm version](http://img.shields.io/npm/v/colur.svg)](https://www.npmjs.com/package/colur)All right, it is not _that_ kool, but it is a stylized logger with [colors](https://www.npmjs.com/package/colors)! I needed a simple stylized colur logger for my test’s and other command console activity. PS. This is a node thang.
### Parameters
+ `colur(, )`
+ `colur()`
+ `return` -> always returns the stylized logger string### Arguments
+ `` -> `String`
* The string you with to log.
+ `` -> `Object`
+ `.color` -> `String`
* Can specify a custom color from the [colors](https://www.npmjs.com/package/colors) library. If you mess up and specify a color that does not exist, then it defaults to the default Green/White color.
+ `.stringCaps` -> `Boolean => true`
* Includes `|>` and `<|` start and end caps.
+ `.endColor` -> `Boolean => true`
* Use the end color which is `bgBlue.white.bold`.
* Alias: `end`
+ `.startColor` -> `Boolean => true`
* Use the start color which is also the default color of `bgGreen.white.bold`.
+ `.consoleType` -> `String`
* Can specify the console type, the default is `info`.
* Omit the `console` part, just include the modifier like `error`.
+ `.strReturn` -> `Boolean => true`
* Does not invoke `console` and just returns the stylized logger string.
+ `.error` -> `Boolean => true`
* A preset that sets the `console` to `error` and uses the color of `bgRed.white.bold`### Preview
![Colur Preview](http://i.imgur.com/EID9OeT.png)