recoder-code
Version:
🚀 AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!
35 lines (24 loc) • 689 B
Markdown
for logging purposes & shareable Symbol constants.
``` js
const { LEVEL } = require('triple-beam');
const colors = require('colors/safe');
const info = {
[ ]: 'error',
level: 'error',
message: 'hey a logging message!'
};
// Colorize your log level!
info.level = colors.green(info.level);
// And still have an unmutated copy of your level!
console.log(info.level === 'error'); // false
console.log(info[LEVEL] === 'error'); // true
```
Tests are written with `mocha`, `assume`, and `nyc`. They can be run with `npm`:
```
npm test
```
Definitions of levels