@rimbu/deep
Advanced tools
Comparing version 0.13.1 to 0.14.0
@@ -73,2 +73,4 @@ "use strict"; | ||
var currentRoot = value === root ? tslib_1.__assign({}, result) : root; | ||
// keep current updated result as parent | ||
var parent_1 = tslib_1.__assign({}, result); | ||
// loop over all the patch keys | ||
@@ -78,3 +80,3 @@ for (var key in entry) { | ||
var currentValue = result[key]; | ||
var newValue = patchEntry(currentValue, value, currentRoot, entry[key]); | ||
var newValue = patchEntry(currentValue, parent_1, currentRoot, entry[key]); | ||
if (!Object.is(currentValue, newValue)) { | ||
@@ -81,0 +83,0 @@ // if value changed, set it in result and mark change |
@@ -65,2 +65,4 @@ import { isPlainObj } from '@rimbu/base'; | ||
const currentRoot = value === root ? Object.assign({}, result) : root; | ||
// keep current updated result as parent | ||
const parent = Object.assign({}, result); | ||
// loop over all the patch keys | ||
@@ -70,3 +72,3 @@ for (const key in entry) { | ||
const currentValue = result[key]; | ||
const newValue = patchEntry(currentValue, value, currentRoot, entry[key]); | ||
const newValue = patchEntry(currentValue, parent, currentRoot, entry[key]); | ||
if (!Object.is(currentValue, newValue)) { | ||
@@ -73,0 +75,0 @@ // if value changed, set it in result and mark change |
{ | ||
"name": "@rimbu/deep", | ||
"version": "0.13.1", | ||
"version": "0.14.0", | ||
"description": "Tools to use handle plain JS objects as immutable objects", | ||
@@ -60,4 +60,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@rimbu/base": "^0.10.1", | ||
"@rimbu/common": "^0.11.0", | ||
"@rimbu/base": "^0.11.0", | ||
"@rimbu/common": "^0.12.0", | ||
"tslib": "^2.4.0" | ||
@@ -68,7 +68,3 @@ }, | ||
}, | ||
"denoify": { | ||
"index": "src/index.ts", | ||
"replacer": "../../config/denoify-rimbu-replacer.js" | ||
}, | ||
"gitHead": "28454fe17a4e51a42f6107f7b1733270d0d88de5" | ||
"gitHead": "442ffd299583458d458e9bbe3dd02c67828707f3" | ||
} |
@@ -60,6 +60,2 @@ <p align="center"> | ||
Because Rimbu uses advanced types, this may slow down the type checking part when running your code. If you're able to rely on your code editor to provide type errors, you can skip the Deno type check using the `--no-check` flag: | ||
`deno run --import-map import_map.json --no-check src/main.ts` | ||
## Usage | ||
@@ -66,0 +62,0 @@ |
@@ -179,2 +179,5 @@ import { IsAnyFunc, IsArray, isPlainObj, IsPlainObj } from '@rimbu/base'; | ||
// keep current updated result as parent | ||
const parent = { ...result }; | ||
// loop over all the patch keys | ||
@@ -186,3 +189,3 @@ for (const key in entry as T) { | ||
currentValue, | ||
value, | ||
parent, | ||
currentRoot, | ||
@@ -189,0 +192,0 @@ (entry as any)[key] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4712
220497
96
+ Added@rimbu/base@0.11.4(transitive)
+ Added@rimbu/common@0.12.3(transitive)
- Removed@rimbu/base@0.10.1(transitive)
- Removed@rimbu/common@0.11.0(transitive)
Updated@rimbu/base@^0.11.0
Updated@rimbu/common@^0.12.0