@@ -912,15 +912,16 @@ shapeReflections = {
912
912
*
913
913
* @signature `.update(target, source)`
914
914
*
915
- * Updates the values (and properties if map-like) of `target` to match the values of `source`. This does
915
+ * Updates the values (and properties if map-like) of `target` to match the values of `source`.
916
+ * Properties of `target` that are not on `source` will be removed. This does
916
917
* not recursively update. For that, use [can-reflect.updateDeep].
917
918
*
918
919
* For map-like objects, every enumerable property on `target` is copied:
919
920
*
920
921
* ```js
921
922
* var target = {name: {first: "Justin"}, age: 34};
922
923
* var source = {name: {last: "Meyer"}};
923
- * var restult = canReflect.assignDeep (target, source);
924
+ * var result = canReflect.update (target, source);
924
925
* target //-> {name: {last: "Meyer"}}
925
926
* ```
926
927
*
@@ -929,7 +930,7 @@ shapeReflections = {
929
930
* ```js
930
931
* var target = ["a","b","c"];
931
932
* var source = ["A","B"];
932
- * canReflect.assign (target, source);
933
+ * canReflect.update (target, source);
933
934
* target //-> ["A","B"]
934
935
* ```
935
936
*
@@ -988,17 +989,18 @@ shapeReflections = {
988
989
* @signature `.updateDeep(target, source)`
989
990
*
990
991
* Updates the values (and properties if map-like) of `target` to match the values of `source`.
992
+ * Removes properties from `target` that are not on `source`.
991
993
*
992
994
* For map-like objects, every enumerable property on `target` is copied:
993
995
*
994
996
* ```js
995
997
* var target = {name: {first: "Justin"}, age: 34};
996
998
* var source = {name: {last: "Meyer"}};
997
- * var restult = canReflect.assignDeep (target, source);
999
+ * var result = canReflect.updateDeep (target, source);
998
1000
* target //-> {name: {last: "Meyer"}}
999
1001
* ```
1000
1002
*
1001
- * An object can control the behavior of `assignDeep ` using the [can-symbol/symbols/updateDeep] symbol.
1003
+ * An object can control the behavior of `updateDeep ` using the [can-symbol/symbols/updateDeep] symbol.
1002
1004
*
1003
1005
* For list-like objects, a diff and patch strategy is used. This attempts to limit the number of changes.
1004
1006
*
0 commit comments