triple-beam
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/triple-beam package

1.4.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.1
    5,157,248
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.4.1
    5,157,248
  • 1.4.0
    3,211
  • 1.3.0
    11,492,535
  • 1.2.0
    1,092
  • 1.1.0
    802
  • 1.0.1
    12
  • 1.0.0
    13

Package Sidebar

Install

npm i triple-beam

Weekly Downloads

7,738,969

Version

1.4.1

License

MIT

Unpacked Size

10.2 kB

Total Files

12

Last publish

Collaborators

  • indexzero
  • dabh