/ live.thehmm.nl / back / node_modules / triple-beam /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]config/2 years ago -  
[TXT]CHANGELOG.md40 years ago374  
[   ]LICENSE40 years ago1.0K 
[TXT]README.md40 years ago689 d7c1522 post receive test [كارل مبارك]
[   ]index.js40 years ago1.0K 
[   ]package.json2 years ago1.7K 
[   ]test.js40 years ago2.5K 
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
Apache/2.4.38 (Debian) Server at www.karls.computer Port 80