merge-patch

0.0.2 • Public • Published

merge-patch

JSON Merge-Patch Implementation with Diff and Combine

This module exports three functions:

//  applies the patch to the target and returns the new value
function apply(target, patch)

//  returns the patch which will convert the old value to the new value
//  returns undefined if there is no change
function diff(oldValue, newValue)

//  combines two patches into a single patch which applies both changes
function combine(patch1, patch2)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i merge-patch

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • krisnye