@omegup/msync 0.0.82 → 0.0.83
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.esm.js +5 -7
- package/index.js +5 -7
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -646,13 +646,13 @@ const $setEach1 = (updater, dict) => {
|
|
|
646
646
|
return $set1(set()(mapExact1(dict, updater)));
|
|
647
647
|
};
|
|
648
648
|
const $setEach = (updater, dict) => $setEach1(updater, dict)(root);
|
|
649
|
-
const $
|
|
650
|
-
const t = deltaExpr(expr);
|
|
649
|
+
const $replaceWithEach1 = (t) => {
|
|
651
650
|
return $setEach(k => to(t(k)), {
|
|
652
651
|
after: ['after', 'after'],
|
|
653
652
|
before: ['before', 'before'],
|
|
654
653
|
});
|
|
655
654
|
};
|
|
655
|
+
const $replaceWithEach = (expr) => $replaceWithEach1(deltaExpr(expr));
|
|
656
656
|
|
|
657
657
|
const $replaceWithDelta = (expr) => $replaceWithEach((field) => sub(expr, root().of(field)));
|
|
658
658
|
const $setDelta = (updater) => {
|
|
@@ -1120,11 +1120,9 @@ const $lookupDelta = ({ field1, field2 }, { coll, exec, input }, k1, k2, k, incl
|
|
|
1120
1120
|
return ite(eq(root().of(f).expr())(nil), nil, field(omit.backward(mergeExpr(omit.forward(map1(k2, a)), map1(k1, part.of(k1).expr())))));
|
|
1121
1121
|
}))
|
|
1122
1122
|
.with(includeNull1 === null
|
|
1123
|
-
? $
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
.of(k2)
|
|
1127
|
-
.expr())), map1(k1, nil)))));
|
|
1123
|
+
? $replaceWithEach1((f) => {
|
|
1124
|
+
const otherField = root().of(f === 'after' ? 'before' : 'after');
|
|
1125
|
+
return $ifNull(root().of(f).expr(), field(omit.backward(mergeExpr(omit.forward(map1(k2, otherField.of(k2).expr())), map1(k1, nil)))));
|
|
1128
1126
|
})
|
|
1129
1127
|
: link().stages)
|
|
1130
1128
|
.with($unwindDelta(k1, k2, k, undefined, includeNull1, includeNull2)).stages;
|
package/index.js
CHANGED
|
@@ -648,13 +648,13 @@ const $setEach1 = (updater, dict) => {
|
|
|
648
648
|
return $set1(set()(mapExact1(dict, updater)));
|
|
649
649
|
};
|
|
650
650
|
const $setEach = (updater, dict) => $setEach1(updater, dict)(root);
|
|
651
|
-
const $
|
|
652
|
-
const t = deltaExpr(expr);
|
|
651
|
+
const $replaceWithEach1 = (t) => {
|
|
653
652
|
return $setEach(k => to(t(k)), {
|
|
654
653
|
after: ['after', 'after'],
|
|
655
654
|
before: ['before', 'before'],
|
|
656
655
|
});
|
|
657
656
|
};
|
|
657
|
+
const $replaceWithEach = (expr) => $replaceWithEach1(deltaExpr(expr));
|
|
658
658
|
|
|
659
659
|
const $replaceWithDelta = (expr) => $replaceWithEach((field) => sub(expr, root().of(field)));
|
|
660
660
|
const $setDelta = (updater) => {
|
|
@@ -1122,11 +1122,9 @@ const $lookupDelta = ({ field1, field2 }, { coll, exec, input }, k1, k2, k, incl
|
|
|
1122
1122
|
return ite(eq(root().of(f).expr())(nil), nil, field(omit.backward(mergeExpr(omit.forward(map1(k2, a)), map1(k1, part.of(k1).expr())))));
|
|
1123
1123
|
}))
|
|
1124
1124
|
.with(includeNull1 === null
|
|
1125
|
-
? $
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
.of(k2)
|
|
1129
|
-
.expr())), map1(k1, nil)))));
|
|
1125
|
+
? $replaceWithEach1((f) => {
|
|
1126
|
+
const otherField = root().of(f === 'after' ? 'before' : 'after');
|
|
1127
|
+
return $ifNull(root().of(f).expr(), field(omit.backward(mergeExpr(omit.forward(map1(k2, otherField.of(k2).expr())), map1(k1, nil)))));
|
|
1130
1128
|
})
|
|
1131
1129
|
: link().stages)
|
|
1132
1130
|
.with($unwindDelta(k1, k2, k, undefined, includeNull1, includeNull2)).stages;
|