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 11![ 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 )
34
45# parse-git-diff
56
7+ A parser for git diff.
8+
69## Installation
710
811``` bash
@@ -11,13 +14,28 @@ npm install parse-git-diff
1114
1215## Demo
1316
14- - [ demo] ( https://yeonjuan.github.io/parse-git-diff/ )
17+ See [ online demo] ( https://yeonjuan.github.io/parse-git-diff/ )
1518
1619## Usage
1720
1821``` js
1922import 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+ // }
2139```
2240
2341## Examples
@@ -446,4 +464,4 @@ index 0e05564..aa39060 100644
446464
447465## License
448466
449- - [ MIT] ( ./LICENSE )
467+ [ MIT] ( ./LICENSE )
Original file line number Diff line number Diff line change 11{
22 "name" : " parse-git-diff" ,
33 "version" : " 0.0.6" ,
4- "description" : " Parse git diff" ,
4+ "description" : " A parser for git diff" ,
55 "main" : " build/index.umd.js" ,
66 "module" : " build/index.module.js" ,
77 "types" : " build/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments