planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

57
node_modules/what-the-diff/README.md generated vendored Normal file
View File

@@ -0,0 +1,57 @@
# JavaScript Diff Parser
![](https://pbs.twimg.com/media/ByZVWXgIIAA5Y2D.png:large)
Credit: [@eightballart](https://twitter.com/EightballArt/status/515195030546690048)
Parse unified diffs with JavaScript
## Installation
what-the-diff is available via npm
npm install what-the-diff
## Usage
```javascript
let {parse} = require('what-the-diff')
var str = `diff --git file.txt file.txt
index 83db48f..bf269f4 100644
--- file.txt
+++ file.txt
@@ -1,3 +1,3 @@
line1
-line2
+new line
line3`
parse(diffStr)
// returns
{
oldPath: 'file.txt',
newPath: 'file.txt',
oldMode: '100644',
newMode: '100644',
status: 'modified',
hunks: [
{
oldStartLine: 1,
oldLineCount: 3,
newStartLine: 1,
newLineCount: 3,
lines: [
' line1',
'-line2',
'+new line',
' line3'
]
}
]
}
```
If the diff includes a similarity index line (from a detected copy or rename), the `similarity` property will be set, and will be a number.