@uxf/core 11.107.0 → 11.108.0

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/README.md CHANGED
@@ -258,6 +258,20 @@ cxa("foo", [1 && "bar", { baz:false, bat:null }, ["hello", ["world"]]], "cya");
258
258
  //=> "foo bar hello world cya"
259
259
  ```
260
260
 
261
+ ### deepmerge
262
+
263
+ Re-export of the [deepmerge](https://github.com/TehShrike/deepmerge) library. Recursively merges two or more objects and arrays.
264
+
265
+ ```ts
266
+ import { deepmerge } from "@uxf/core/utils/deepmerge";
267
+
268
+ const target = { a: 1, b: { x: 10 } };
269
+ const source = { b: { y: 20 }, c: 3 };
270
+
271
+ deepmerge(target, source);
272
+ /* returns { a: 1, b: { x: 10, y: 20 }, c: 3 } */
273
+ ```
274
+
261
275
  ### deepEqualIgnoringKeyOrder
262
276
 
263
277
  deepEqualIgnoringKeyOrder compares two values for deep equality while ignoring the order of object keys. It serializes values in a stable way, ensuring that objects with the same data but different key orders are treated as equal. Arrays remain order-sensitive, circular references are handled safely, and primitives are compared by value.
@@ -401,6 +415,17 @@ if (inArray(status, statuses)) {
401
415
  }
402
416
  ```
403
417
 
418
+ ## isEqual
419
+
420
+ Re-export of [lodash.isequal](https://lodash.com/docs/#isEqual). Performs a deep comparison between two values to determine if they are equivalent.
421
+
422
+ ```ts
423
+ import isEqual from "@uxf/core/utils/is-equal";
424
+
425
+ isEqual({ a: 1, b: [2, 3] }, { a: 1, b: [2, 3] }); /* returns true */
426
+ isEqual({ a: 1 }, { a: 2 }); /* returns false */
427
+ ```
428
+
404
429
  ## isEmpty
405
430
 
406
431
  ```tsx
@@ -589,6 +614,17 @@ t("items", 3); // returns "položky"
589
614
  t("items", 5); // returns "položek"
590
615
  ```
591
616
 
617
+ ## qs
618
+
619
+ Re-export of [qs](https://github.com/ljharb/qs). A querystring parsing and stringifying library.
620
+
621
+ ```ts
622
+ import { stringify, parse } from "@uxf/core/utils/qs";
623
+
624
+ stringify({ a: "b", c: [1, 2] }); /* returns "a=b&c%5B0%5D=1&c%5B1%5D=2" */
625
+ parse("a=b&c=1"); /* returns { a: "b", c: "1" } */
626
+ ```
627
+
592
628
  ## slugify
593
629
 
594
630
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/core",
3
- "version": "11.107.0",
3
+ "version": "11.108.0",
4
4
  "description": "UXF Core",
5
5
  "author": "Petr Vejvoda <vejvoda@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/core#readme",
@@ -20,6 +20,11 @@
20
20
  "typecheck": "tsc --noEmit --skipLibCheck"
21
21
  },
22
22
  "dependencies": {
23
+ "@types/lodash.isequal": "4.5.8",
24
+ "@types/qs": "6.15.0",
25
+ "deepmerge": "4.3.1",
26
+ "lodash.isequal": "4.5.0",
27
+ "qs": "6.15.0",
23
28
  "ts-pattern": "5.9.0"
24
29
  },
25
30
  "bugs": {
@@ -0,0 +1,2 @@
1
+ export { default as deepmerge } from "deepmerge";
2
+ export type { ArrayMergeOptions, Options } from "deepmerge";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.deepmerge = void 0;
7
+ var deepmerge_1 = require("deepmerge");
8
+ Object.defineProperty(exports, "deepmerge", { enumerable: true, get: function () { return __importDefault(deepmerge_1).default; } });
@@ -0,0 +1 @@
1
+ export {} from "lodash.isequal";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/utils/qs.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { parse, stringify } from "qs";
2
+ export type { IParseOptions, IStringifyOptions, ParsedQs } from "qs";
package/utils/qs.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringify = exports.parse = void 0;
4
+ var qs_1 = require("qs");
5
+ Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return qs_1.parse; } });
6
+ Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return qs_1.stringify; } });