Comparing version 1.2.0 to 1.2.1
@@ -40,4 +40,3 @@ /** | ||
for (var i = 0; i < precedingSourceLines.length; i++) { | ||
var lineLength = precedingSourceLines[i].length; | ||
var indexDelta = lineLength + 1; // add 1 to account for linebreak | ||
var indexDelta = precedingSourceLines[i].length; | ||
@@ -63,3 +62,9 @@ cumulativeIndex += indexDelta; | ||
function splitIntoLines(source) { | ||
return source.split('\n'); | ||
var sourceLines = source.split('\n'); | ||
for (var i = 0; i < sourceLines.length; i++) { | ||
sourceLines[i] = sourceLines[i] + "\n"; | ||
} | ||
return sourceLines; | ||
} | ||
@@ -66,0 +71,0 @@ |
{ | ||
"name": "locater", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Easily locate string or regex in a multi-line input", | ||
@@ -5,0 +5,0 @@ "main": "./lib/locater.js", |
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
15343
265