@dereekb/util 12.6.19 → 12.6.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util/fetch",
3
- "version": "12.6.19",
3
+ "version": "12.6.21",
4
4
  ".": {
5
5
  "types": "./src/index.d.ts",
6
6
  "node": {
package/index.cjs.js CHANGED
@@ -12971,7 +12971,7 @@ class ModelRelationUtility {
12971
12971
  merge,
12972
12972
  shouldRemove
12973
12973
  } = config;
12974
- const readType = config.readType;
12974
+ const readType = config.readType ?? (() => '0');
12975
12975
  function remove(rCurrent = current, rMods = mods) {
12976
12976
  return ModelRelationUtility._modifyCollection(rCurrent, rMods, (x, y) => {
12977
12977
  return ModelRelationUtility.removeFromCollection(x, y, readKey, shouldRemove);
@@ -13008,22 +13008,24 @@ class ModelRelationUtility {
13008
13008
  return performInsert();
13009
13009
  }
13010
13010
  }
13011
- static updateCollection(current, update, {
13012
- readKey,
13013
- readType,
13014
- merge
13015
- }) {
13011
+ static updateCollection(current, update, config) {
13012
+ const {
13013
+ readKey,
13014
+ readType,
13015
+ merge
13016
+ } = config;
13016
13017
  ModelRelationUtility._assertMergeProvided(merge);
13017
13018
  return ModelRelationUtility._modifyCollection(current, update, (x, y) => ModelRelationUtility._updateSingleTypeCollection(x, y, {
13018
13019
  readKey,
13019
13020
  merge
13020
13021
  }), readType);
13021
13022
  }
13022
- static insertCollection(current, update, {
13023
- readKey,
13024
- readType,
13025
- merge
13026
- }) {
13023
+ static insertCollection(current, update, config) {
13024
+ const {
13025
+ readKey,
13026
+ readType,
13027
+ merge
13028
+ } = config;
13027
13029
  ModelRelationUtility._assertMergeProvided(merge);
13028
13030
  return ModelRelationUtility._modifyCollection(current, update, (x, y) => ModelRelationUtility._insertSingleTypeCollection(x, y, {
13029
13031
  readKey,
package/index.esm.js CHANGED
@@ -12969,7 +12969,7 @@ class ModelRelationUtility {
12969
12969
  merge,
12970
12970
  shouldRemove
12971
12971
  } = config;
12972
- const readType = config.readType;
12972
+ const readType = config.readType ?? (() => '0');
12973
12973
  function remove(rCurrent = current, rMods = mods) {
12974
12974
  return ModelRelationUtility._modifyCollection(rCurrent, rMods, (x, y) => {
12975
12975
  return ModelRelationUtility.removeFromCollection(x, y, readKey, shouldRemove);
@@ -13006,22 +13006,24 @@ class ModelRelationUtility {
13006
13006
  return performInsert();
13007
13007
  }
13008
13008
  }
13009
- static updateCollection(current, update, {
13010
- readKey,
13011
- readType,
13012
- merge
13013
- }) {
13009
+ static updateCollection(current, update, config) {
13010
+ const {
13011
+ readKey,
13012
+ readType,
13013
+ merge
13014
+ } = config;
13014
13015
  ModelRelationUtility._assertMergeProvided(merge);
13015
13016
  return ModelRelationUtility._modifyCollection(current, update, (x, y) => ModelRelationUtility._updateSingleTypeCollection(x, y, {
13016
13017
  readKey,
13017
13018
  merge
13018
13019
  }), readType);
13019
13020
  }
13020
- static insertCollection(current, update, {
13021
- readKey,
13022
- readType,
13023
- merge
13024
- }) {
13021
+ static insertCollection(current, update, config) {
13022
+ const {
13023
+ readKey,
13024
+ readType,
13025
+ merge
13026
+ } = config;
13025
13027
  ModelRelationUtility._assertMergeProvided(merge);
13026
13028
  return ModelRelationUtility._modifyCollection(current, update, (x, y) => ModelRelationUtility._insertSingleTypeCollection(x, y, {
13027
13029
  readKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util",
3
- "version": "12.6.19",
3
+ "version": "12.6.21",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",
@@ -74,8 +74,8 @@ export interface UpdateMiltiTypeRelationConfig<T> extends UpdateRelationConfig<T
74
74
  */
75
75
  export declare class ModelRelationUtility {
76
76
  static modifyStringCollection(current: Maybe<RelationString[]>, change: RelationChangeType, mods: RelationString[]): RelationString[];
77
- static modifyCollection<T extends RelationObject>(current: Maybe<T[]>, change: RelationChangeType, mods: T[], config: UpdateRelationConfig<T>): T[];
78
77
  static modifyCollection<T extends RelationObject>(current: Maybe<T[]>, change: RelationChangeType, mods: T[], config: UpdateMiltiTypeRelationConfig<T>): T[];
78
+ static modifyCollection<T extends RelationObject>(current: Maybe<T[]>, change: RelationChangeType, mods: T[], config: UpdateRelationConfig<T>): T[];
79
79
  /**
80
80
  * The mask results are merged together.
81
81
  *
@@ -83,8 +83,8 @@ export declare class ModelRelationUtility {
83
83
  */
84
84
  private static _mergeMaskResults;
85
85
  private static _modifyCollectionWithoutMask;
86
- static updateCollection<T extends RelationObject>(current: T[], update: T[], { readKey, readType, merge }: UpdateMiltiTypeRelationConfig<T>): T[];
87
- static insertCollection<T extends RelationObject>(current: T[], update: T[], { readKey, readType, merge }: UpdateMiltiTypeRelationConfig<T>): T[];
86
+ static updateCollection<T extends RelationObject>(current: T[], update: T[], config: UpdateRelationConfig<T> | UpdateMiltiTypeRelationConfig<T>): T[];
87
+ static insertCollection<T extends RelationObject>(current: T[], update: T[], config: UpdateRelationConfig<T> | UpdateMiltiTypeRelationConfig<T>): T[];
88
88
  /**
89
89
  * Used to modify a collection which may be multi-type. If readType is provided, the collection is handled as a multi-type map.
90
90
  */
package/test/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [12.6.21](https://github.com/dereekb/dbx-components/compare/v12.6.20-dev...v12.6.21) (2026-02-18)
6
+
7
+
8
+
9
+ ## [12.6.20](https://github.com/dereekb/dbx-components/compare/v12.6.19-dev...v12.6.20) (2026-02-15)
10
+
11
+
12
+
5
13
  ## [12.6.19](https://github.com/dereekb/dbx-components/compare/v12.6.18-dev...v12.6.19) (2026-02-13)
6
14
 
7
15
 
package/test/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util/test",
3
- "version": "12.6.19",
3
+ "version": "12.6.21",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@dereekb/util": "*"