mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2025-12-17 05:55:11 +00:00
|
|
||
|---|---|---|
| .. | ||
| .nyc_output | ||
| config | ||
| CHANGELOG.md | ||
| index.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
triple-beam
Definitions of levels for logging purposes & shareable Symbol constants.
Usage
const { LEVEL } = require('triple-beam');
const colors = require('colors/safe');
const info = {
[LEVEL]: '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
Tests are written with mocha, assume, and nyc. They can be run with npm:
npm test