erp-mecanicas-diesel-backend/node_modules/triple-beam
2026-01-04 06:41:28 -06:00
..
.nyc_output Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00
config Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00
CHANGELOG.md Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00
index.js Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00
LICENSE Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00
package.json Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00
README.md Initial commit - erp-mecanicas-diesel-backend 2026-01-04 06:41:28 -06:00

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