mevento-std
v0.2.0
Published
Portable standard utility modules for MEvento v2.
Readme
MEvento Std TypeScript
Portable standard utility modules for MEvento v2.
import { MEvento } from "mevento";
import { registerMEventoStd, MEventoStdModules } from "mevento-std";
const vm = MEvento.newInstance();
registerMEventoStd(vm, { modules: MEventoStdModules.all });
const active = vm.execute(
"listWhere(offers, \"item.status == 'active'\")",
true,
{ offers: [{ status: "active" }, { status: "draft" }] },
);core modules include type, string, number, math, list, map, JSON, encoding,
and validation helpers. all also includes date and legacy helpers.
Object path helpers are intentionally excluded; use native dot access for static object traversal.
Function Catalog
Type
typeOf
isNull
isBoolean
isNumber
isString
isArray
isObjectString
stringOf
stringLower
stringUpper
stringTrim
stringTrimLeft
stringTrimRight
stringContains
stringStartsWith
stringEndsWith
stringIndexOf
stringSplit
stringReplace
stringSubstring
stringPadLeft
stringPadRight
stringReverse
stringBlank
stringNotBlank
stringCapitalize
stringTitleCase
stringNormalizeSpace
stringRemovePrefix
stringRemoveSuffix
stringBefore
stringAfter
stringBetweenNumber And Math
numberParse
numberTryParse
numberRound
numberFloor
numberCeil
numberAbs
numberClamp
numberToInt
numberToReal
numberFixed
numberIsNaN
numberIsInfinite
mathMin
mathMax
mathPow
mathSqrt
mathLog
mathExp
mathSin
mathCos
mathTan
mathAsin
mathAcos
mathAtan
mathAtan2List
listContains
listIndexOf
listFirst
listLast
listJoin
listReverse
listSlice
listConcat
listLength
listIsEmpty
listAt
listSet
listAppend
listPrepend
listRemoveAt
listTake
listDrop
listUnique
listSum
listMin
listMax
listAverage
listPluck
listFindBy
listFilterBy
listAnyBy
listAllBy
listCountBy
listGroupBy
listWhere
listFindWhere
listAnyWhere
listAllWhere
listCountWhere
listMapWhereExpression helpers such as listWhere and listMapWhere evaluate a MEvento
expression per item with item, index, list, context, and context keys
available.
Map
mapGet
mapSet
mapRemove
mapMerge
mapEntriesJSON And Encoding
jsonEncode
jsonDecode
jsonTryDecode
base64Encode
base64Decode
uriEncode
uriDecode
uriFullEncode
uriFullDecodeDate
Date functions are included when using MEventoStdModules.all.
dateNowMillis
dateNowIso
dateParseMillis
dateTryParseMillis
dateAdd
dateFormatIso
dateStartOfDay
dateEndOfDay
dateDiff
dateBefore
dateAfter
dateBetweenValidation
required
defaultIfNull
defaultIfBlank
isIn
isEmail
isUrlLegacy
Legacy helpers are included when using MEventoStdModules.all.
toString
convertToString
toNumber
length