Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-diff

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-diff - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

test-diff.txt

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc