@openforis/arena-core 2.16.10 → 2.16.11

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,11 +1,6 @@
1
- import differenceWith from 'lodash.differencewith';
2
1
  import { isEqual } from './isEqual';
3
- import { fromPairs } from './fromPairs';
4
- import { toPairs } from './toPairs';
5
- export const difference = (object, otherObject) => {
6
- const pairsOther = toPairs(otherObject);
7
- const pairsObject = toPairs(object);
8
- const pairsDifference = differenceWith(pairsOther, pairsObject, isEqual);
9
- return fromPairs(pairsDifference);
10
- };
2
+ /**
3
+ * Returns the props of otherObject missing in object or with a different value.
4
+ */
5
+ export const difference = (object, otherObject) => Object.fromEntries(Object.entries(otherObject !== null && otherObject !== void 0 ? otherObject : {}).filter(([key, value]) => !(object && Object.prototype.hasOwnProperty.call(object, key) && isEqual(object[key], value))));
11
6
  //# sourceMappingURL=difference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"difference.js","sourceRoot":"","sources":["../../../../src/utils/_objects/difference.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,WAAgB,EAAoB,EAAE;IAC5E,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IACvC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACnC,MAAM,eAAe,GAAG,cAAc,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;IACxE,OAAO,SAAS,CAAC,eAAe,CAAC,CAAA;AACnC,CAAC,CAAA","sourcesContent":["import differenceWith from 'lodash.differencewith'\n\nimport { isEqual } from './isEqual'\nimport { fromPairs } from './fromPairs'\nimport { toPairs } from './toPairs'\n\nexport const difference = (object: any, otherObject: any): Record<any, any> => {\n const pairsOther = toPairs(otherObject)\n const pairsObject = toPairs(object)\n const pairsDifference = differenceWith(pairsOther, pairsObject, isEqual)\n return fromPairs(pairsDifference)\n}\n"]}
1
+ {"version":3,"file":"difference.js","sourceRoot":"","sources":["../../../../src/utils/_objects/difference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,WAAgB,EAAoB,EAAE,CAC5E,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC,MAAM,CACtC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAChH,CACF,CAAA","sourcesContent":["import { isEqual } from './isEqual'\n\n/**\n * Returns the props of otherObject missing in object or with a different value.\n */\nexport const difference = (object: any, otherObject: any): Record<any, any> =>\n Object.fromEntries(\n Object.entries(otherObject ?? {}).filter(\n ([key, value]) => !(object && Object.prototype.hasOwnProperty.call(object, key) && isEqual(object[key], value))\n )\n )\n"]}
@@ -1,2 +1,2 @@
1
- export { default as fromPairs } from 'lodash.frompairs';
1
+ export const fromPairs = (pairs) => Object.fromEntries(pairs !== null && pairs !== void 0 ? pairs : []);
2
2
  //# sourceMappingURL=fromPairs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fromPairs.js","sourceRoot":"","sources":["../../../../src/utils/_objects/fromPairs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA","sourcesContent":["export { default as fromPairs } from 'lodash.frompairs'\n"]}
1
+ {"version":3,"file":"fromPairs.js","sourceRoot":"","sources":["../../../../src/utils/_objects/fromPairs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAA+D,EAAuB,EAAE,CAChH,MAAM,CAAC,WAAW,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAA","sourcesContent":["export const fromPairs = (pairs: Iterable<readonly [PropertyKey, any]> | null | undefined): Record<string, any> =>\n Object.fromEntries(pairs ?? [])\n"]}
@@ -1,2 +1,2 @@
1
- export { default as toPairs } from 'lodash.topairs';
1
+ export const toPairs = (object) => Object.entries(object !== null && object !== void 0 ? object : {});
2
2
  //# sourceMappingURL=toPairs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toPairs.js","sourceRoot":"","sources":["../../../../src/utils/_objects/toPairs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAA","sourcesContent":["export { default as toPairs } from 'lodash.topairs'\n"]}
1
+ {"version":3,"file":"toPairs.js","sourceRoot":"","sources":["../../../../src/utils/_objects/toPairs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAW,EAAmB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,CAAA","sourcesContent":["export const toPairs = (object: any): [string, any][] => Object.entries(object ?? {})\n"]}
@@ -1 +1,4 @@
1
+ /**
2
+ * Returns the props of otherObject missing in object or with a different value.
3
+ */
1
4
  export declare const difference: (object: any, otherObject: any) => Record<any, any>;
@@ -1,18 +1,10 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.difference = void 0;
7
- const lodash_differencewith_1 = __importDefault(require("lodash.differencewith"));
8
4
  const isEqual_1 = require("./isEqual");
9
- const fromPairs_1 = require("./fromPairs");
10
- const toPairs_1 = require("./toPairs");
11
- const difference = (object, otherObject) => {
12
- const pairsOther = (0, toPairs_1.toPairs)(otherObject);
13
- const pairsObject = (0, toPairs_1.toPairs)(object);
14
- const pairsDifference = (0, lodash_differencewith_1.default)(pairsOther, pairsObject, isEqual_1.isEqual);
15
- return (0, fromPairs_1.fromPairs)(pairsDifference);
16
- };
5
+ /**
6
+ * Returns the props of otherObject missing in object or with a different value.
7
+ */
8
+ const difference = (object, otherObject) => Object.fromEntries(Object.entries(otherObject !== null && otherObject !== void 0 ? otherObject : {}).filter(([key, value]) => !(object && Object.prototype.hasOwnProperty.call(object, key) && (0, isEqual_1.isEqual)(object[key], value))));
17
9
  exports.difference = difference;
18
10
  //# sourceMappingURL=difference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"difference.js","sourceRoot":"","sources":["../../../src/utils/_objects/difference.ts"],"names":[],"mappings":";;;;;;AAAA,kFAAkD;AAElD,uCAAmC;AACnC,2CAAuC;AACvC,uCAAmC;AAE5B,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,WAAgB,EAAoB,EAAE;IAC5E,MAAM,UAAU,GAAG,IAAA,iBAAO,EAAC,WAAW,CAAC,CAAA;IACvC,MAAM,WAAW,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC,CAAA;IACnC,MAAM,eAAe,GAAG,IAAA,+BAAc,EAAC,UAAU,EAAE,WAAW,EAAE,iBAAO,CAAC,CAAA;IACxE,OAAO,IAAA,qBAAS,EAAC,eAAe,CAAC,CAAA;AACnC,CAAC,CAAA;AALY,QAAA,UAAU,GAAV,UAAU,CAKtB","sourcesContent":["import differenceWith from 'lodash.differencewith'\n\nimport { isEqual } from './isEqual'\nimport { fromPairs } from './fromPairs'\nimport { toPairs } from './toPairs'\n\nexport const difference = (object: any, otherObject: any): Record<any, any> => {\n const pairsOther = toPairs(otherObject)\n const pairsObject = toPairs(object)\n const pairsDifference = differenceWith(pairsOther, pairsObject, isEqual)\n return fromPairs(pairsDifference)\n}\n"]}
1
+ {"version":3,"file":"difference.js","sourceRoot":"","sources":["../../../src/utils/_objects/difference.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC;;GAEG;AACI,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,WAAgB,EAAoB,EAAE,CAC5E,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC,MAAM,CACtC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,IAAA,iBAAO,EAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAChH,CACF,CAAA;AALU,QAAA,UAAU,GAAV,UAAU,CAKpB","sourcesContent":["import { isEqual } from './isEqual'\n\n/**\n * Returns the props of otherObject missing in object or with a different value.\n */\nexport const difference = (object: any, otherObject: any): Record<any, any> =>\n Object.fromEntries(\n Object.entries(otherObject ?? {}).filter(\n ([key, value]) => !(object && Object.prototype.hasOwnProperty.call(object, key) && isEqual(object[key], value))\n )\n )\n"]}
@@ -1 +1 @@
1
- export { default as fromPairs } from 'lodash.frompairs';
1
+ export declare const fromPairs: (pairs: Iterable<readonly [PropertyKey, any]> | null | undefined) => Record<string, any>;
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.fromPairs = void 0;
7
- var lodash_frompairs_1 = require("lodash.frompairs");
8
- Object.defineProperty(exports, "fromPairs", { enumerable: true, get: function () { return __importDefault(lodash_frompairs_1).default; } });
4
+ const fromPairs = (pairs) => Object.fromEntries(pairs !== null && pairs !== void 0 ? pairs : []);
5
+ exports.fromPairs = fromPairs;
9
6
  //# sourceMappingURL=fromPairs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fromPairs.js","sourceRoot":"","sources":["../../../src/utils/_objects/fromPairs.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAuD;AAA9C,8HAAA,OAAO,OAAa","sourcesContent":["export { default as fromPairs } from 'lodash.frompairs'\n"]}
1
+ {"version":3,"file":"fromPairs.js","sourceRoot":"","sources":["../../../src/utils/_objects/fromPairs.ts"],"names":[],"mappings":";;;AAAO,MAAM,SAAS,GAAG,CAAC,KAA+D,EAAuB,EAAE,CAChH,MAAM,CAAC,WAAW,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAA;AADpB,QAAA,SAAS,GAAT,SAAS,CACW","sourcesContent":["export const fromPairs = (pairs: Iterable<readonly [PropertyKey, any]> | null | undefined): Record<string, any> =>\n Object.fromEntries(pairs ?? [])\n"]}
@@ -7,6 +7,7 @@ import { deleteEmptyProps } from './deleteEmptyProps';
7
7
  import { dissoc } from './dissoc';
8
8
  import { dissocPath } from './dissocPath';
9
9
  import { dissocPathIfEmpty } from './dissocPathIfEmpty';
10
+ import { fromPairs } from './fromPairs';
10
11
  import { isEmpty } from './isEmpty';
11
12
  import { isNotEmpty } from './isNotEmpty';
12
13
  import { isNil } from './isNil';
@@ -15,6 +16,7 @@ import { path } from './path';
15
16
  import { propertyOf } from './propertyOf';
16
17
  import { setInPath } from './setInPath';
17
18
  import { stringify } from './stringify';
19
+ import { toPairs } from './toPairs';
18
20
  export declare const Objects: {
19
21
  assoc: typeof assoc;
20
22
  assocPath: typeof assocPath;
@@ -25,10 +27,7 @@ export declare const Objects: {
25
27
  dissoc: typeof dissoc;
26
28
  dissocPath: typeof dissocPath;
27
29
  dissocPathIfEmpty: typeof dissocPathIfEmpty;
28
- fromPairs: {
29
- <T>(pairs: import("lodash").List<[import("lodash").PropertyName, T]> | null | undefined): import("lodash").Dictionary<T>;
30
- (pairs: import("lodash").List<any[]> | null | undefined): import("lodash").Dictionary<any>;
31
- };
30
+ fromPairs: typeof fromPairs;
32
31
  isEmpty: typeof isEmpty;
33
32
  isEqual: (value: any, other: any) => boolean;
34
33
  isNil: typeof isNil;
@@ -38,8 +37,5 @@ export declare const Objects: {
38
37
  propertyOf: typeof propertyOf;
39
38
  setInPath: typeof setInPath;
40
39
  stringify: typeof stringify;
41
- toPairs: {
42
- <T>(object?: import("lodash").Dictionary<T> | import("lodash").NumericDictionary<T>): Array<[string, T]>;
43
- (object?: object): Array<[string, any]>;
44
- };
40
+ toPairs: typeof toPairs;
45
41
  };
@@ -1 +1 @@
1
- export { default as toPairs } from 'lodash.topairs';
1
+ export declare const toPairs: (object: any) => [string, any][];
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.toPairs = void 0;
7
- var lodash_topairs_1 = require("lodash.topairs");
8
- Object.defineProperty(exports, "toPairs", { enumerable: true, get: function () { return __importDefault(lodash_topairs_1).default; } });
4
+ const toPairs = (object) => Object.entries(object !== null && object !== void 0 ? object : {});
5
+ exports.toPairs = toPairs;
9
6
  //# sourceMappingURL=toPairs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toPairs.js","sourceRoot":"","sources":["../../../src/utils/_objects/toPairs.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAmD;AAA1C,0HAAA,OAAO,OAAW","sourcesContent":["export { default as toPairs } from 'lodash.topairs'\n"]}
1
+ {"version":3,"file":"toPairs.js","sourceRoot":"","sources":["../../../src/utils/_objects/toPairs.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,MAAW,EAAmB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC,CAAA;AAAxE,QAAA,OAAO,GAAP,OAAO,CAAiE","sourcesContent":["export const toPairs = (object: any): [string, any][] => Object.entries(object ?? {})\n"]}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "OpenForis",
5
5
  "email": "openforis.arena@gmail.com"
6
6
  },
7
- "version": "2.16.10",
7
+ "version": "2.16.11",
8
8
  "description": "Arena core module",
9
9
  "repository": {
10
10
  "type": "git",
@@ -23,10 +23,7 @@
23
23
  "devDependencies": {
24
24
  "@jest/globals": "^30.5.2",
25
25
  "@types/jest": "^30.0.0",
26
- "@types/lodash.differencewith": "^4.5.9",
27
- "@types/lodash.frompairs": "^4.0.9",
28
26
  "@types/lodash.isequal": "^4.5.8",
29
- "@types/lodash.topairs": "^4.3.9",
30
27
  "@types/node": "^26.6.5",
31
28
  "@types/proj4": "^2.19.0",
32
29
  "@typescript-eslint/eslint-plugin": "^8",
@@ -54,10 +51,7 @@
54
51
  "change-case": "^5.4.4",
55
52
  "dayjs": "^1.11.23",
56
53
  "jsep": "^1.6.0",
57
- "lodash.differencewith": "^4.5.0",
58
- "lodash.frompairs": "^4.0.1",
59
54
  "lodash.isequal": "^4.5.0",
60
- "lodash.topairs": "^4.3.0",
61
55
  "n2words": "^6.3.0",
62
56
  "proj4": "^2.22.0",
63
57
  "uuid": "^14.0.3"