@graffy/common 0.16.0-alpha.13 → 0.16.0-alpha.14
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/index.cjs +16 -16
- package/index.mjs +16 -16
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -1508,29 +1508,29 @@ function encode(value, { version, isGraph } = {}) {
|
|
|
1508
1508
|
var _a2;
|
|
1509
1509
|
if (!isDef(object))
|
|
1510
1510
|
return;
|
|
1511
|
+
const { $key, $ver, $ref, $val, $chi, $put, ...props2 } = object || {};
|
|
1512
|
+
if (typeof object === "object" && object && !Array.isArray(object)) {
|
|
1513
|
+
object = {
|
|
1514
|
+
...Object.fromEntries(
|
|
1515
|
+
Object.entries({
|
|
1516
|
+
$key,
|
|
1517
|
+
$ver,
|
|
1518
|
+
$ref,
|
|
1519
|
+
$val,
|
|
1520
|
+
$chi,
|
|
1521
|
+
$put
|
|
1522
|
+
}).filter(([_, val]) => isDef(val))
|
|
1523
|
+
),
|
|
1524
|
+
...props2
|
|
1525
|
+
};
|
|
1526
|
+
}
|
|
1511
1527
|
if (typeof object === "object" && object && isEmpty(object))
|
|
1512
1528
|
return;
|
|
1513
|
-
const { $key, $ver, $ref, $val, $chi, $put, ...props2 } = object || {};
|
|
1514
1529
|
if (isDef($ver))
|
|
1515
1530
|
ver = $ver;
|
|
1516
1531
|
if (isPlainObject($key)) {
|
|
1517
1532
|
const [page, filter] = splitArgs($key);
|
|
1518
1533
|
if (page) {
|
|
1519
|
-
if (typeof object === "object" && object && !Array.isArray(object)) {
|
|
1520
|
-
object = {
|
|
1521
|
-
...Object.fromEntries(
|
|
1522
|
-
Object.entries({
|
|
1523
|
-
$key,
|
|
1524
|
-
$ver,
|
|
1525
|
-
$ref,
|
|
1526
|
-
$val,
|
|
1527
|
-
$chi,
|
|
1528
|
-
$put
|
|
1529
|
-
}).filter(([_, val]) => isDef(val))
|
|
1530
|
-
),
|
|
1531
|
-
...props2
|
|
1532
|
-
};
|
|
1533
|
-
}
|
|
1534
1534
|
const foundPuts = parentPuts.filter(([_, putFilter]) => isEqual__default.default(filter, putFilter)).map(([range]) => range);
|
|
1535
1535
|
if (isGraph && !isDef(page.$cursor) && ($ref || $val || $chi || $put || !isEmpty(props2))) {
|
|
1536
1536
|
object.$key = filter || {};
|
package/index.mjs
CHANGED
|
@@ -1503,29 +1503,29 @@ function encode(value, { version, isGraph } = {}) {
|
|
|
1503
1503
|
var _a2;
|
|
1504
1504
|
if (!isDef(object))
|
|
1505
1505
|
return;
|
|
1506
|
+
const { $key, $ver, $ref, $val, $chi, $put, ...props2 } = object || {};
|
|
1507
|
+
if (typeof object === "object" && object && !Array.isArray(object)) {
|
|
1508
|
+
object = {
|
|
1509
|
+
...Object.fromEntries(
|
|
1510
|
+
Object.entries({
|
|
1511
|
+
$key,
|
|
1512
|
+
$ver,
|
|
1513
|
+
$ref,
|
|
1514
|
+
$val,
|
|
1515
|
+
$chi,
|
|
1516
|
+
$put
|
|
1517
|
+
}).filter(([_, val]) => isDef(val))
|
|
1518
|
+
),
|
|
1519
|
+
...props2
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1506
1522
|
if (typeof object === "object" && object && isEmpty(object))
|
|
1507
1523
|
return;
|
|
1508
|
-
const { $key, $ver, $ref, $val, $chi, $put, ...props2 } = object || {};
|
|
1509
1524
|
if (isDef($ver))
|
|
1510
1525
|
ver = $ver;
|
|
1511
1526
|
if (isPlainObject($key)) {
|
|
1512
1527
|
const [page, filter] = splitArgs($key);
|
|
1513
1528
|
if (page) {
|
|
1514
|
-
if (typeof object === "object" && object && !Array.isArray(object)) {
|
|
1515
|
-
object = {
|
|
1516
|
-
...Object.fromEntries(
|
|
1517
|
-
Object.entries({
|
|
1518
|
-
$key,
|
|
1519
|
-
$ver,
|
|
1520
|
-
$ref,
|
|
1521
|
-
$val,
|
|
1522
|
-
$chi,
|
|
1523
|
-
$put
|
|
1524
|
-
}).filter(([_, val]) => isDef(val))
|
|
1525
|
-
),
|
|
1526
|
-
...props2
|
|
1527
|
-
};
|
|
1528
|
-
}
|
|
1529
1529
|
const foundPuts = parentPuts.filter(([_, putFilter]) => isEqual(filter, putFilter)).map(([range]) => range);
|
|
1530
1530
|
if (isGraph && !isDef(page.$cursor) && ($ref || $val || $chi || $put || !isEmpty(props2))) {
|
|
1531
1531
|
object.$key = filter || {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graffy/common",
|
|
3
3
|
"description": "Common libraries that used by various Graffy modules.",
|
|
4
4
|
"author": "aravind (https://github.com/aravindet)",
|
|
5
|
-
"version": "0.16.0-alpha.
|
|
5
|
+
"version": "0.16.0-alpha.14",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./index.mjs",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"lodash": "^4.17.19",
|
|
20
20
|
"merge-async-iterators": "^0.2.1",
|
|
21
|
-
"@graffy/stream": "0.16.0-alpha.
|
|
21
|
+
"@graffy/stream": "0.16.0-alpha.14"
|
|
22
22
|
}
|
|
23
23
|
}
|