simple-update-in
Advanced tools
Comparing version 1.1.2-master.6d997fd to 1.1.2-master.9dfd73c
@@ -10,8 +10,9 @@ # Changelog | ||
- If after `updater` result in nothing change (triple-equal `===`), will return untouched | ||
- `updater` returned `undefined` will | ||
- `updater` returned `undefined` will be treated as removing the item | ||
### Fixed | ||
- Updating `[1, 2]` with `[-1, 0]` set to `'Hello'` should return `[1, 2, ['Hello']]` instead of `[1, 2, 'Hello']` | ||
- Append not creating sub-structure correctly | ||
- `updateIn([1, 2], [-1, 0], 'Hello')` should return `[1, 2, ['Hello']]` instead of `[1, 2, 'Hello']` | ||
## [1.1.1] | ||
## [1.1.1] - 2018-04-06 | ||
### Fixed | ||
@@ -18,0 +19,0 @@ - Move `babel` and `gulp` into `devDependencies` |
{ | ||
"name": "simple-update-in", | ||
"version": "1.1.2-master.6d997fd", | ||
"version": "1.1.2-master.9dfd73c", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -19,10 +19,12 @@ # simple-update-in | ||
For example, `obj.one.two = 1.2`, call `updateIn(obj, ['one', 'two'], 1.2)`. It will return a new object with changes in deep clone. | ||
We share similar signature as [ImmutableJS.updateIn](https://facebook.github.io/immutable-js/docs/#/Map/updateIn): | ||
```js | ||
updateIn( | ||
target: Array|Map, | ||
updateIn<T: Array|Map>( | ||
target: T, | ||
path: (Number|String)[], | ||
updater?: (value: any) => any | ||
) | ||
): T | ||
``` | ||
@@ -29,0 +31,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22522
167