root 3bf41bf355 update | 1 gadu atpakaļ | |
---|---|---|
.. | ||
config | 1 gadu atpakaļ | |
.eslintrc | 1 gadu atpakaļ | |
.gitattributes | 1 gadu atpakaļ | |
.travis.yml | 1 gadu atpakaļ | |
CHANGELOG.md | 1 gadu atpakaļ | |
LICENSE | 1 gadu atpakaļ | |
README.md | 1 gadu atpakaļ | |
index.js | 1 gadu atpakaļ | |
package.json | 1 gadu atpakaļ | |
test.js | 1 gadu atpakaļ |
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