root 3bf41bf355 update | 1 rok temu | |
---|---|---|
.. | ||
config | 1 rok temu | |
.eslintrc | 1 rok temu | |
.gitattributes | 1 rok temu | |
.travis.yml | 1 rok temu | |
CHANGELOG.md | 1 rok temu | |
LICENSE | 1 rok temu | |
README.md | 1 rok temu | |
index.js | 1 rok temu | |
package.json | 1 rok temu | |
test.js | 1 rok temu |
Definitions of levels for logging purposes & shareable Symbol constants.
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 are written with mocha
, assume
, and nyc
. They can be run with npm
:
npm test