seamless-immutable-patch
v1.0.5
Published
[![npm version](https://badge.fury.io/js/seamless-immutable-patch.svg)](https://badge.fury.io/js/seamless-immutable-patch) [![Test Status](https://github.com/UniversalDataTool/seamless-immutable-patch/workflows/Release/badge.svg)](https://github.com/Unive
Downloads
42
Readme
seamless-immutable-patch
Execute JSON Patches on seamless-immutable objects.
Installation
npm install seamless-immutable-patch
Usage
const immutable = require("seamless-immutable")
const seamlessImmutablePatch = require("seamless-immutable-patch")
const obj = immutable({
a: 1,
b: {
c: 2,
},
})
const patched = seamlessImmutablePatch(obj, [
{
op: "replace",
path: "/b/c",
value: 3,
},
])
/*
> patched
immutable({
a: 1,
b: {
c: 3,
},
})
*/