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

    1.3.0 • 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

    Install

    npm i triple-beam

    DownloadsWeekly Downloads

    5,898,568

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    9.21 kB

    Total Files

    13

    Last publish

    Collaborators

    • indexzero
    • dabh