add ES5 usage

This commit is contained in:
doug
2016-08-09 10:26:45 -04:00
parent 945b7b1bf4
commit d3cbb3eb99

View File

@@ -16,6 +16,16 @@ This is a mostly-compatible re-implementation of [react's update function](https
## next: { a: 1, b: 2 }
## orig: { a: 1 }
## Usage (ES5)
var update = require("update-immutable").default;
var orig = { a: 1 };
var next = update(orig, { b: { $set: 2 } });
## next: { a: 1, b: 2 }
## orig: { a: 1 }
## Features