Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tennashi/deno-diff-parser


https://github.com/tennashi/deno-diff-parser

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# diff-parser
Parse unified diff format

## Usage

```ts
import { parse } from "https://deno.land/x/diff_parser/mod.ts";

const process = Deno.run({
cmd: ["git", "diff", "--no-color"]
stdout: "piped",
});

const output = await process.output();
const diffText = new TextDecoder().decode(output);
process.close();

parse(diffText);
```