parse-diff
Advanced tools
Comparing version 0.4.1 to 0.4.2
18
index.js
@@ -1,4 +0,5 @@ | ||
// parses unified diff | ||
// http://www.gnu.org/software/diffutils/manual/diffutils.html#Unified-Format | ||
var defaultToWhiteSpace, escapeRegExp, ltrim, makeString, parseFile, parseFileFallback, trimLeft; | ||
// parses unified diff | ||
// http://www.gnu.org/software/diffutils/manual/diffutils.html#Unified-Format | ||
var defaultToWhiteSpace, escapeRegExp, ltrim, makeString, parseFile, parseFileFallback, trimLeft, | ||
slice = [].slice; | ||
@@ -82,2 +83,5 @@ module.exports = function(input) { | ||
del = function(line) { | ||
if (!current) { | ||
return; | ||
} | ||
current.changes.push({ | ||
@@ -92,2 +96,5 @@ type: 'del', | ||
add = function(line) { | ||
if (!current) { | ||
return; | ||
} | ||
current.changes.push({ | ||
@@ -102,2 +109,5 @@ type: 'add', | ||
normal = function(line) { | ||
if (!current) { | ||
return; | ||
} | ||
return current.changes.push({ | ||
@@ -113,3 +123,3 @@ type: 'normal', | ||
var recentChange, ref; | ||
ref = current.changes, recentChange = ref[ref.length - 1]; | ||
ref = current.changes, [recentChange] = slice.call(ref, -1); | ||
return current.changes.push({ | ||
@@ -116,0 +126,0 @@ type: recentChange.type, |
{ | ||
"name": "parse-diff", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Unified diff parser", | ||
@@ -29,6 +29,6 @@ "author": "Sergey Todyshev <stodyshev@gmail.com>", | ||
"devDependencies": { | ||
"coffeelint": "^2.0.7", | ||
"coffeescript": "^2.1.1", | ||
"coffeelint": "^2.1.0", | ||
"coffeescript": "^2.2.2", | ||
"expect.js": "^0.3.1", | ||
"grunt": "^1.0.1", | ||
"grunt": "^1.0.2", | ||
"grunt-auto-release": "^0.0.7", | ||
@@ -35,0 +35,0 @@ "grunt-bump": "^0.8.0", |
Sorry, the diff of this file is not supported yet
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
116695
14
254
1