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

what-the-diff

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

what-the-diff - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

6

lib/parser.js

@@ -183,3 +183,4 @@ /*

baseStartLine: base_range.start,
baseLineCount: base_range.count
baseLineCount: base_range.count,
heading: context ? context.trim() : '',
}

@@ -196,3 +197,4 @@ },

newStartLine: new_range.start,
newLineCount: new_range.count
newLineCount: new_range.count,
heading: context ? context.trim() : '',
}

@@ -199,0 +201,0 @@ },

{
"name": "what-the-diff",
"version": "0.2.0",
"version": "0.3.0",
"description": "diff parsing library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,3 +13,3 @@ var diff = require('../')

+++ file.txt
@@ -1,3 +1,3 @@
@@ -1,3 +1,3 @@ class Thing {
line1

@@ -35,2 +35,3 @@ -line2

newLineCount: 3,
heading: 'class Thing {',
lines: [

@@ -75,2 +76,3 @@ ' line1',

newLineCount: 1,
heading: '',
lines: ['+foo']

@@ -110,2 +112,3 @@ }

newLineCount: 0,
heading: '',
lines: ['-foo']

@@ -149,2 +152,3 @@ }

newLineCount: 3,
heading: '',
lines: [

@@ -211,2 +215,3 @@ ' line1',

newLineCount: 1,
heading: '',
lines: [

@@ -258,2 +263,3 @@ '-line1',

newLineCount: 4,
heading: '',
lines: [

@@ -272,2 +278,3 @@ ' line1',

newLineCount: 5,
heading: '',
lines: [

@@ -314,2 +321,3 @@ ' line6',

newLineCount: 1,
heading: '',
lines: [

@@ -354,2 +362,3 @@ '-line',

newLineCount: 1,
heading: '',
lines: [

@@ -395,2 +404,3 @@ '-line',

newLineCount: 3,
heading: '',
lines: [

@@ -416,3 +426,3 @@ ' line1',

+++ modified-on-both.txt
@@@ -1,1 -1,1 +1,7 @@@
@@@ -1,1 -1,1 +1,7 @@@ some context
++<<<<<<< HEAD

@@ -445,2 +455,3 @@ +master modification

theirLineCount: 7,
heading: 'some context',
lines: [

@@ -447,0 +458,0 @@ '++<<<<<<< HEAD',

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