chitfund/backend/node_modules/triple-beam
Deep Koluguri afb40fdc87 Initial commit 2025-11-05 00:37:09 -05:00
..
.nyc_output Initial commit 2025-11-05 00:37:09 -05:00
config Initial commit 2025-11-05 00:37:09 -05:00
CHANGELOG.md Initial commit 2025-11-05 00:37:09 -05:00
LICENSE Initial commit 2025-11-05 00:37:09 -05:00
README.md Initial commit 2025-11-05 00:37:09 -05:00
index.js Initial commit 2025-11-05 00:37:09 -05:00
package.json Initial commit 2025-11-05 00:37:09 -05:00

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
LICENSE: MIT
AUTHOR: Charlie Robbins