patchfile

4.0.1 • Public • Published

Patchfile

Patch file with given diff.

Install

npm i patchfile

How to use?

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

Readme

Keywords

Package Sidebar

Install

npm i patchfile

Weekly Downloads

164

Version

4.0.1

License

MIT

Unpacked Size

5.17 kB

Total Files

5

Last publish

Collaborators

  • coderaiser