@omegup/msync 0.1.69 → 0.1.70

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 CHANGED
@@ -110,6 +110,13 @@ const $substr = (expr, start, length) => asExpr({ raw: (f) => asExprRaw({ $subst
110
110
  start.raw(f).get(),
111
111
  length.raw(f).get()
112
112
  ] }) });
113
+ const $indexOfCP = (expr, substring, start, end) => asExpr({ raw: (f) => asExprRaw({ $indexOfCP: [
114
+ expr.raw(f).get(),
115
+ substring.raw(f).get(),
116
+ ...start ? [start.raw(f).get()] : [],
117
+ ...end ? [end.raw(f).get()] : []
118
+ ] }) });
119
+ const $split = (expr, delimiter) => asExpr({ raw: (f) => asExprRaw({ $split: [expr.raw(f).get(), delimiter.raw(f).get()] }) });
113
120
  const padLeft = (expr, pad) => asExpr({ raw: (f) => asExprRaw({ $let: {
114
121
  vars: { x: { $concat: [{ $literal: pad }, expr.raw(f).get()] } },
115
122
  in: { $substrCP: [
@@ -157,6 +164,7 @@ const $setUnion = (...exprs) => asExpr({ raw: (f) => asExprRaw({ $setUnion: expr
157
164
  const first = (expr) => asExpr({ raw: (f) => asExprRaw({ $first: expr.raw(f).get() }) });
158
165
  const firstSure = first;
159
166
  const last = (expr) => asExpr({ raw: (f) => asExprRaw({ $last: expr.raw(f).get() }) });
167
+ const $arrayElemAt = (expr, idx) => asExpr({ raw: (f) => asExprRaw({ $arrayElemAt: [expr.raw(f).get(), idx.raw(f).get()] }) });
160
168
  const mergeObjects = (...exprs) => asExpr({ raw: (f) => asExprRaw({ $mergeObjects: exprs.map((x) => x.raw(f).get()) }) });
161
169
  const $objectToArray = (expr) => asExpr({ raw: (f) => asExprRaw({ $objectToArray: expr.raw(f).get() }) });
162
170
  const $arrayToObject = (expr) => asExpr({ raw: (f) => asExprRaw({ $arrayToObject: expr.raw(f).get() }) });
@@ -2119,6 +2127,6 @@ const executes = (view, input, needs) => {
2119
2127
  };
2120
2128
  const single = (view, needs = {}) => pipe((input) => executes(view, input, needs), emptyDelta(), concatDelta, emptyDelta);
2121
2129
  //#endregion
2122
- export { $accumulator, $and, $arrayToObject, $countDict, $countDictArray, $entries, $eq, $exists, $expr, $getField, $group, $groupId, $groupMerge, $group_, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $insert, $insertPart, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map0, $map1, $match, $matchDelta, $merge, $merge2, $mergeId, $mergePart, $merge_, $ne, $nin, $nor, $objectToArray, $or, $outerLookup, $pushDict, $rand, $reduce, $replaceWith, $set, $setUnion, $simpleInsert, $simpleMerge, $simpleMergePart, $substr, $sum, $type, $unwind, $unwindDelta, Field, Machine, add, and, anyElementTrue, array, ceil, comp, concat, concatArray, createIndex, ctx, current, dateAdd, dateDiff, dateLt, datePart, dayAndMonthPart, divide, emptyDelta, eq, eqTyped, except, exprMapVal, field, fieldF, fieldM, filter, filterDefined, first, firstSure, floor, from, fromEq, func, getSubsetMatchForExt, getWhenMatched, getWhenMatchedForMerge, gt, gte, inArray, isArray, ite, joinIdOf, last, literalsEqaul, log, lt, lte, map1, mapExact, mapExact0, mapExact1, mapExactToObject, mapExactToObject0, mapExactToObject1, mapFromPlainDateTime, mapToPlainDateTime, mapVal, matchDelta, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, min, minDate, monthPart, multiply, ne, nil, noop, not, notNull, now, or, padLeft, rand, range, reflex, regex, root, set, setField, single, size, slice, sortArray, spread, spread0, staging, startOf, str, sub, subtract, sym, to, toInt, useDriver, val, weekPart, wrap, year };
2130
+ export { $accumulator, $and, $arrayElemAt, $arrayToObject, $countDict, $countDictArray, $entries, $eq, $exists, $expr, $getField, $group, $groupId, $groupMerge, $group_, $gt, $gtTs, $gte, $gteTs, $ifNull, $in, $indexOfCP, $insert, $insertPart, $insertX, $keys, $let, $lookup, $lt, $lte, $map, $map0, $map1, $match, $matchDelta, $merge, $merge2, $mergeId, $mergePart, $merge_, $ne, $nin, $nor, $objectToArray, $or, $outerLookup, $pushDict, $rand, $reduce, $replaceWith, $set, $setUnion, $simpleInsert, $simpleMerge, $simpleMergePart, $split, $substr, $sum, $type, $unwind, $unwindDelta, Field, Machine, add, and, anyElementTrue, array, ceil, comp, concat, concatArray, createIndex, ctx, current, dateAdd, dateDiff, dateLt, datePart, dayAndMonthPart, divide, emptyDelta, eq, eqTyped, except, exprMapVal, field, fieldF, fieldM, filter, filterDefined, first, firstSure, floor, from, fromEq, func, getSubsetMatchForExt, getWhenMatched, getWhenMatchedForMerge, gt, gte, inArray, isArray, ite, joinIdOf, last, literalsEqaul, log, lt, lte, map1, mapExact, mapExact0, mapExact1, mapExactToObject, mapExactToObject0, mapExactToObject1, mapFromPlainDateTime, mapToPlainDateTime, mapVal, matchDelta, max, maxDate, mergeExact, mergeExact0, mergeExpr, mergeObjects, min, minDate, monthPart, multiply, ne, nil, noop, not, notNull, now, or, padLeft, rand, range, reflex, regex, root, set, setField, single, size, slice, sortArray, spread, spread0, staging, startOf, str, sub, subtract, sym, to, toInt, useDriver, val, weekPart, wrap, year };
2123
2131
 
2124
2132
  //# sourceMappingURL=index.esm.js.map