刘琳琳 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
..
.nyc_output 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
CHANGELOG.md 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
LICENSE 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
README.md 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
index.js 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago
package.json 97c35fdf0d 航汇HHArome小程序容器演示 2 months ago

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