File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1
1
![ action status] ( https://github.com/yeonjuan/parse-git-diff/actions/workflows/main.yml/badge.svg?branch=main )
2
- [ ![ npm version] ( https://badge.fury.io/js/parse-git-diff.svg )] ( https://badge.fury.io/js/parse-git-diff )
2
+ [ ![ npm version] ( https://badge.fury.io/js/parse-git-diff.svg )] ( https://www.npmjs.com/package/parse-git-diff )
3
+ [ ![ license] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( ./LICENSE )
3
4
4
5
# parse-git-diff
5
6
7
+ A parser for git diff.
8
+
6
9
## Installation
7
10
8
11
``` bash
@@ -11,13 +14,28 @@ npm install parse-git-diff
11
14
12
15
## Demo
13
16
14
- - [ demo] ( https://yeonjuan.github.io/parse-git-diff/ )
17
+ See [ online demo] ( https://yeonjuan.github.io/parse-git-diff/ )
15
18
16
19
## Usage
17
20
18
21
``` js
19
22
import parseGitDiff from ' parse-git-diff' ;
20
- parseGitDiff (' ...' );
23
+
24
+ const result = parseGitDiff (' ... git diff ...' );
25
+
26
+ console .log (result);
27
+ // {
28
+ // "type": "GitDiff",
29
+ // "files": [
30
+ // {
31
+ // "type": "AddedFile",
32
+ // "chunks": [
33
+ // {
34
+ // "type": "Chunk",
35
+ // "toFileRange": {
36
+ // "start": 1,
37
+ // ...
38
+ // }
21
39
```
22
40
23
41
## Examples
@@ -446,4 +464,4 @@ index 0e05564..aa39060 100644
446
464
447
465
## License
448
466
449
- - [ MIT] ( ./LICENSE )
467
+ [ MIT] ( ./LICENSE )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " parse-git-diff" ,
3
3
"version" : " 0.0.6" ,
4
- "description" : " Parse git diff" ,
4
+ "description" : " A parser for git diff" ,
5
5
"main" : " build/index.umd.js" ,
6
6
"module" : " build/index.module.js" ,
7
7
"types" : " build/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments