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
- Host: GitHub
- URL: https://github.com/coderaiser/node-patchfile
- Owner: coderaiser
- License: mit
- Created: 2015-01-08T21:44:23.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-10T08:39:43.000Z (over 2 years ago)
- Last Synced: 2025-06-17T12:44:35.589Z (10 months ago)
- Topics: diff, file, patch
- Language: JavaScript
- Size: 25.4 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
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