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

https://github.com/coderaiser/node-patchfile

patch file with given diff
https://github.com/coderaiser/node-patchfile

diff file patch

Last synced: 9 months ago
JSON representation

patch file with given diff

Awesome Lists containing this project

README

          

# Patchfile

Patch file with given diff.

## Install

```
npm i patchfile
```

## How to use?

```js
const daffy = require('daffy');
const patchfile = require('patchfile');
const patch = daffy.createPatch('hello', 'hello world');
const tryToCatch = require('try-to-catch');

/* patch file thet not bigger then 2kb */
const [e] = await tryToCatch(patchfile, 'hello.txt', patch, {
size: 2048,
});

if (e)
console.error(e.message);
```

## License

MIT