Comparing version 0.3.0 to 1.0.0
15
index.js
@@ -100,5 +100,3 @@ 'use strict'; | ||
var ret = ''; | ||
var insideEscape = false; | ||
var escapeCode; | ||
var visible = 0; | ||
@@ -127,3 +125,3 @@ var lengths = wordLengths(str); | ||
if (rowLength + lengths[i] > cols) { | ||
if (rowLength + lengths[i] > cols && rowLength > 0) { | ||
rows.push(''); | ||
@@ -139,4 +137,2 @@ } | ||
visible = 0; | ||
for (var j = 0; j < pre.length; j++) { | ||
@@ -150,13 +146,4 @@ var y = pre[j]; | ||
escapeCode = code === END_CODE ? null : code; | ||
} else if (insideEscape && y === 'm') { | ||
insideEscape = false; | ||
continue; | ||
} | ||
if (insideEscape) { | ||
continue; | ||
} | ||
visible++; | ||
if (escapeCode && ESCAPE_CODES[escapeCode]) { | ||
@@ -163,0 +150,0 @@ if (pre[j + 1] === '\n') { |
{ | ||
"name": "wrap-ansi", | ||
"version": "0.3.0", | ||
"version": "1.0.0", | ||
"description": "Wordwrap a string with ANSI escape codes", | ||
@@ -62,2 +62,3 @@ "license": "MIT", | ||
"coveralls": "^2.11.4", | ||
"has-ansi": "^2.0.0", | ||
"nyc": "^3.2.2", | ||
@@ -64,0 +65,0 @@ "strip-ansi": "^3.0.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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
7021
7
128
1