normalize-log
Advanced tools
Comparing version 0.1.0 to 0.2.0
11
index.js
require('colors') | ||
var chalk = require('chalk') | ||
var lengthOf = require('string-length') | ||
@@ -13,3 +14,3 @@ var maxlength = 10 | ||
description = name | ||
name = 'error'.red | ||
name = chalk.red('error') | ||
} | ||
@@ -25,7 +26,1 @@ console.error(pad(name) + ' ' + description) | ||
} | ||
// length of a string without color codes | ||
function lengthOf(string) { | ||
string = string.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') | ||
return Buffer.byteLength(string) | ||
} |
{ | ||
"name": "normalize-log", | ||
"description": "nlz(1) logging with colors", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": { | ||
@@ -14,4 +14,5 @@ "name": "Jonathan Ong", | ||
"dependencies": { | ||
"colors": "0" | ||
"chalk": "0", | ||
"string-length": "0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2081
2
19
+ Addedchalk@0
+ Addedstring-length@0
+ Addedansi-regex@0.1.00.2.1(transitive)
+ Addedansi-styles@1.1.0(transitive)
+ Addedchalk@0.5.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@0.1.0(transitive)
+ Addedstring-length@0.1.2(transitive)
+ Addedstrip-ansi@0.2.20.3.0(transitive)
+ Addedsupports-color@0.2.0(transitive)
- Removedcolors@0
- Removedcolors@0.6.2(transitive)