itcast 6e512b8ce6 aaaa 10 月之前
..
.nyc_output 6e512b8ce6 aaaa 10 月之前
config 6e512b8ce6 aaaa 10 月之前
CHANGELOG.md 6e512b8ce6 aaaa 10 月之前
LICENSE 6e512b8ce6 aaaa 10 月之前
README.md 6e512b8ce6 aaaa 10 月之前
index.js 6e512b8ce6 aaaa 10 月之前
package.json 6e512b8ce6 aaaa 10 月之前

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