@arrai-innovations/reactive-helpers 2.6.0 → 2.6.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -4,7 +4,7 @@ import { cloneDeep, isEmpty, isObject } from "lodash";
4
4
  import { assignReactiveObject } from "../utils/assignReactiveObject";
5
5
  import inspect from "browser-util-inspect";
6
6
  import { useCancellableIntent } from "../utils/cancellableIntent";
7
- import loadingCombine from "../utils/loadingCombine";
7
+ import { loadingCombine } from "../utils/loadingCombine";
8
8
 
9
9
  export class ListSubscriptionError extends Error {
10
10
  constructor(message) {
@@ -3,7 +3,7 @@ import { computed, effectScope, reactive, toRef } from "vue";
3
3
  import { assignReactiveObject } from "../utils/assignReactiveObject";
4
4
  import { useObjectInstance } from "./objectInstance";
5
5
  import { useCancellableIntent } from "../utils/cancellableIntent";
6
- import loadingCombine from "../utils/loadingCombine";
6
+ import { loadingCombine } from "../utils/loadingCombine";
7
7
 
8
8
  export class ObjectSubscriptionError extends Error {
9
9
  constructor(message) {
@@ -9,7 +9,7 @@ export function getFakeId(arraySetMapOrObject, key = "id") {
9
9
  if (isSet(arraySetMapOrObject) || isMap(arraySetMapOrObject)) {
10
10
  test = () => arraySetMapOrObject.has(fakeId);
11
11
  } else if (isArray(arraySetMapOrObject)) {
12
- test = () => arraySetMapOrObject.some((item) => item[key] === fakeId);
12
+ test = () => arraySetMapOrObject.some((item) => item?.[key] === fakeId);
13
13
  } else {
14
14
  test = () => fakeId in arraySetMapOrObject;
15
15
  }
package/utils/index.js CHANGED
@@ -3,6 +3,7 @@ export * from "./cancellableIntent";
3
3
  export * from "./flattenPaths";
4
4
  export * from "./getFakeId";
5
5
  export * from "./keyDiff";
6
+ export * from "./loadingCombine";
6
7
  export * from "./set";
7
8
  export * from "./unrefAndToRawDeep";
8
9
  export * from "./watches";
@@ -1,4 +1,4 @@
1
- export default function (...loadingStates) {
1
+ export function loadingCombine(...loadingStates) {
2
2
  // loadingStates is an array of booleans or undefined
3
3
  // if any true, return true
4
4
  // if all undefined, return undefined