@blazingedge/update
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "@blazingedge/update", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Utility for immutable deep updates of objects.", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
@@ -16,3 +16,3 @@ [![Build Status](https://travis-ci.org/blazing-edge-labs/update.svg?branch=master)](https://travis-ci.org/blazing-edge-labs/update) | ||
const newState = update(state, 'path.to.users[7].data', { | ||
const newState = update(state, 'path.to.users[7]', { | ||
email: 'some.email@example.com', | ||
@@ -65,6 +65,6 @@ balance: { | ||
```js | ||
update(state, 'path.to.users[*].data.balance', n => n + 100) | ||
update(state, 'path.to.users[*].balance', n => n + 100) | ||
update(state, 'path.to.users[*]', (user) => { | ||
if (Math.random() < 8) { | ||
if (Math.random() < 0.8) { | ||
return REMOVE | ||
@@ -71,0 +71,0 @@ } |
19883