From d3cbb3eb990b67b080d01a8f3f13905d8a6b749d Mon Sep 17 00:00:00 2001 From: doug Date: Tue, 9 Aug 2016 10:26:45 -0400 Subject: [PATCH] add ES5 usage --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 15fea71..1436233 100644 --- a/README.md +++ b/README.md @@ -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