@xano/xanoscript-language-server 11.0.3

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.
Files changed (716) hide show
  1. package/.claude/settings.local.json +27 -0
  2. package/.github/copilot-instructions.md +190 -0
  3. package/.github/workflows/ci.yml +31 -0
  4. package/.husky/pre-commit +1 -0
  5. package/CLAUDE.md +121 -0
  6. package/LICENSE +21 -0
  7. package/README.md +55 -0
  8. package/connection.js +7 -0
  9. package/documents.js +5 -0
  10. package/embedded/README.md +102 -0
  11. package/embedded/embeddedContent.js +74 -0
  12. package/embedded/embeddedDocuments.js +57 -0
  13. package/embedded/jsLanguageService.js +74 -0
  14. package/eslint.config.js +24 -0
  15. package/language-server-worker.js +52 -0
  16. package/lexer/action.js +31 -0
  17. package/lexer/addon.js +31 -0
  18. package/lexer/agent.js +37 -0
  19. package/lexer/agent_trigger.js +42 -0
  20. package/lexer/ai.js +82 -0
  21. package/lexer/api.js +81 -0
  22. package/lexer/api_group.js +58 -0
  23. package/lexer/arrays.js +161 -0
  24. package/lexer/branch.js +31 -0
  25. package/lexer/cast.js +105 -0
  26. package/lexer/cloud.js +159 -0
  27. package/lexer/columns.js +234 -0
  28. package/lexer/comment.js +61 -0
  29. package/lexer/comment.spec.js +77 -0
  30. package/lexer/control.js +634 -0
  31. package/lexer/db.js +190 -0
  32. package/lexer/debug.js +37 -0
  33. package/lexer/expect.js +157 -0
  34. package/lexer/function.js +36 -0
  35. package/lexer/identifier.js +6 -0
  36. package/lexer/lexer.js +26 -0
  37. package/lexer/literal.js +77 -0
  38. package/lexer/math.js +97 -0
  39. package/lexer/mcp_server.js +51 -0
  40. package/lexer/mcp_server_trigger.js +42 -0
  41. package/lexer/middleware.js +42 -0
  42. package/lexer/multiline.js +24 -0
  43. package/lexer/multiline.spec.js +179 -0
  44. package/lexer/object.js +44 -0
  45. package/lexer/query.js +99 -0
  46. package/lexer/realtime_trigger.js +50 -0
  47. package/lexer/redis.js +145 -0
  48. package/lexer/security.js +161 -0
  49. package/lexer/storage.js +99 -0
  50. package/lexer/stream.js +49 -0
  51. package/lexer/table.js +38 -0
  52. package/lexer/table_trigger.js +50 -0
  53. package/lexer/task.js +83 -0
  54. package/lexer/tests/query/query_lexer.spec.js +36 -0
  55. package/lexer/tests/query/valid_sources/basic_query.xs +44 -0
  56. package/lexer/tests/query/valid_sources/db_query.xs +77 -0
  57. package/lexer/tests/query/valid_sources/empty_query.xs +5 -0
  58. package/lexer/tests/query/valid_sources/header_query.xs +15 -0
  59. package/lexer/tests/table/basic_table.xs +17 -0
  60. package/lexer/tests/table/empty_table.xs +3 -0
  61. package/lexer/tests/table/table_lexer.spec.js +324 -0
  62. package/lexer/text.js +114 -0
  63. package/lexer/tokens.js +526 -0
  64. package/lexer/tool.js +39 -0
  65. package/lexer/util.js +113 -0
  66. package/lexer/utils.js +56 -0
  67. package/lexer/utils.spec.js +61 -0
  68. package/lexer/var.js +30 -0
  69. package/lexer/variables.js +217 -0
  70. package/lexer/workflow_test.js +42 -0
  71. package/lexer/workspace.js +23 -0
  72. package/lexer/workspace_trigger.js +42 -0
  73. package/lexer/zip.js +63 -0
  74. package/logic-assistant-script.js +8 -0
  75. package/onCheckError/onCheckError.js +43 -0
  76. package/onCompletion/contentAssist.js +183 -0
  77. package/onCompletion/contentAssist.spec.js +275 -0
  78. package/onCompletion/onCompletion.js +38 -0
  79. package/onDidChangeContent/onDidChangeContent.js +128 -0
  80. package/onHover/FilterMessageProvider.js +102 -0
  81. package/onHover/FilterMessageProvider.spec.js +85 -0
  82. package/onHover/FunctionMessageProvider.js +122 -0
  83. package/onHover/FunctionMessageProvider.spec.js +128 -0
  84. package/onHover/HoverMessageProvider.js +31 -0
  85. package/onHover/InputFilterMessageProvider.js +140 -0
  86. package/onHover/InputFilterMessageProvider.spec.js +329 -0
  87. package/onHover/InputVariableMessageProvider.js +55 -0
  88. package/onHover/QueryFilterMessageProvider.spec.js +164 -0
  89. package/onHover/filters.md +2852 -0
  90. package/onHover/functions.md +2617 -0
  91. package/onHover/inputFilters.md +271 -0
  92. package/onHover/onHover.js +40 -0
  93. package/onHover/onHoverDocument.js +64 -0
  94. package/onHover/onHoverDocument.spec.js +486 -0
  95. package/onHover/queryFilterMessageProvider.js +122 -0
  96. package/onHover/queryFilters.md +489 -0
  97. package/onSemanticCheck/highlight.js +45 -0
  98. package/onSemanticCheck/onSemanticCheck.js +25 -0
  99. package/onSemanticCheck/tokens.js +40 -0
  100. package/package.json +48 -0
  101. package/parser/addon_parser.js +90 -0
  102. package/parser/addon_parser.spec.js +88 -0
  103. package/parser/agent_parser.js +281 -0
  104. package/parser/agent_parser.spec.js +599 -0
  105. package/parser/agent_trigger_parser.js +138 -0
  106. package/parser/agent_trigger_parser.spec.js +525 -0
  107. package/parser/api_group_parser.js +143 -0
  108. package/parser/api_group_parser.spec.js +127 -0
  109. package/parser/attributes/columnDefaultValueAttribute.js +33 -0
  110. package/parser/attributes/columnDefaultValueAttribute.spec.js +49 -0
  111. package/parser/attributes/descriptionFieldAttribute.js +24 -0
  112. package/parser/attributes/descriptionFieldAttribute.spec.js +39 -0
  113. package/parser/attributes/disabledFieldAttribute.js +19 -0
  114. package/parser/attributes/disabledFieldAttribute.spec.js +34 -0
  115. package/parser/attributes/docsFieldAttribute.js +24 -0
  116. package/parser/attributes/docsFieldAttribute.spec.js +39 -0
  117. package/parser/attributes/inputFilterFn.js +71 -0
  118. package/parser/attributes/inputFilterFn.spec.js +39 -0
  119. package/parser/attributes/register.js +41 -0
  120. package/parser/attributes/sensitiveFieldAttribute.js +17 -0
  121. package/parser/attributes/sensitiveFieldAttribute.spec.js +39 -0
  122. package/parser/attributes/valueFieldAttribute.js +17 -0
  123. package/parser/attributes/valueFieldAttribute.spec.js +54 -0
  124. package/parser/attributes/valuesFieldAttribute.js +18 -0
  125. package/parser/attributes/valuesFieldAttribute.spec.js +44 -0
  126. package/parser/base_parser.js +249 -0
  127. package/parser/branch_parser.js +49 -0
  128. package/parser/branch_parser.spec.js +34 -0
  129. package/parser/clauses/agentClause.js +23 -0
  130. package/parser/clauses/agentClause.spec.js +34 -0
  131. package/parser/clauses/authClause.js +17 -0
  132. package/parser/clauses/authClause.spec.js +39 -0
  133. package/parser/clauses/cacheClause.js +32 -0
  134. package/parser/clauses/cacheClause.spec.js +103 -0
  135. package/parser/clauses/canonicalClause.js +23 -0
  136. package/parser/clauses/canonicalClause.spec.js +34 -0
  137. package/parser/clauses/channelClause.js +23 -0
  138. package/parser/clauses/channelClause.spec.js +34 -0
  139. package/parser/clauses/dbTableClause.js +23 -0
  140. package/parser/clauses/dbTableClause.spec.js +34 -0
  141. package/parser/clauses/flexibleStringClause.js +43 -0
  142. package/parser/clauses/historyClause.js +19 -0
  143. package/parser/clauses/historyClause.spec.js +53 -0
  144. package/parser/clauses/indexClause.js +36 -0
  145. package/parser/clauses/indexClause.spec.js +47 -0
  146. package/parser/clauses/inputClause.js +35 -0
  147. package/parser/clauses/inputClause.spec.js +79 -0
  148. package/parser/clauses/mcpServerClause.js +23 -0
  149. package/parser/clauses/mcpServerClause.spec.js +34 -0
  150. package/parser/clauses/middlewareClause.js +39 -0
  151. package/parser/clauses/middlewareClause.spec.js +161 -0
  152. package/parser/clauses/nakedStackFn.js +69 -0
  153. package/parser/clauses/nakedStackFn.spec.js +63 -0
  154. package/parser/clauses/outputClause.js +33 -0
  155. package/parser/clauses/register.js +50 -0
  156. package/parser/clauses/responseClause.js +17 -0
  157. package/parser/clauses/responseClause.spec.js +42 -0
  158. package/parser/clauses/scheduleClause.js +37 -0
  159. package/parser/clauses/scheduleClause.spec.js +71 -0
  160. package/parser/clauses/schemaClause.js +66 -0
  161. package/parser/clauses/schemaClause.spec.js +66 -0
  162. package/parser/clauses/stackClause.js +16 -0
  163. package/parser/clauses/testClause.js +73 -0
  164. package/parser/clauses/testClause.spec.js +78 -0
  165. package/parser/clauses/viewClause.js +49 -0
  166. package/parser/clauses/viewClause.spec.js +154 -0
  167. package/parser/definitions/arraySlice.js +70 -0
  168. package/parser/definitions/arraySlice.spec.js +49 -0
  169. package/parser/definitions/columnDefinition.js +139 -0
  170. package/parser/definitions/columnDefinition.spec.js +199 -0
  171. package/parser/definitions/dbLinkColumnDefinition.js +24 -0
  172. package/parser/definitions/dbLinkColumnDefinition.spec.js +45 -0
  173. package/parser/definitions/enumColumnDefinition.js +55 -0
  174. package/parser/definitions/enumColumnDefinition.spec.js +108 -0
  175. package/parser/definitions/filterDefinition.js +23 -0
  176. package/parser/definitions/filterDefinition.spec.js +43 -0
  177. package/parser/definitions/objectColumnDefinition.js +52 -0
  178. package/parser/definitions/objectColumnDefinition.spec.js +118 -0
  179. package/parser/definitions/register.js +28 -0
  180. package/parser/function_parser.js +123 -0
  181. package/parser/function_parser.spec.js +83 -0
  182. package/parser/functions/actionCallFn.js +41 -0
  183. package/parser/functions/actionCallFn.spec.js +51 -0
  184. package/parser/functions/addonCallFn.js +39 -0
  185. package/parser/functions/addonCallFn.spec.js +41 -0
  186. package/parser/functions/ai/aiAgentRunFn.js +40 -0
  187. package/parser/functions/ai/aiAgentRunFn.spec.js +94 -0
  188. package/parser/functions/ai/aiExternalMcpServerDetailsFn.js +28 -0
  189. package/parser/functions/ai/aiExternalMcpServerDetailsFn.spec.js +85 -0
  190. package/parser/functions/ai/aiExternalMcpToolListFn.js +28 -0
  191. package/parser/functions/ai/aiExternalMcpToolListFn.spec.js +85 -0
  192. package/parser/functions/ai/aiExternalMcpToolRunFn.js +30 -0
  193. package/parser/functions/ai/aiExternalMcpToolRunFn.spec.js +101 -0
  194. package/parser/functions/ai/register.js +24 -0
  195. package/parser/functions/aiFn.js +61 -0
  196. package/parser/functions/aiFn.spec.js +51 -0
  197. package/parser/functions/api/apiCallFn.js +49 -0
  198. package/parser/functions/api/apiCallFn.spec.js +60 -0
  199. package/parser/functions/api/apiLambdaFn.js +19 -0
  200. package/parser/functions/api/apiLambdaFn.spec.js +63 -0
  201. package/parser/functions/api/apiRealtimeEventFn.js +25 -0
  202. package/parser/functions/api/apiRealtimeEventFn.spec.js +82 -0
  203. package/parser/functions/api/apiRequestFn.js +47 -0
  204. package/parser/functions/api/apiRequestFn.spec.js +113 -0
  205. package/parser/functions/api/apiStreamFn.js +22 -0
  206. package/parser/functions/api/apiStreamFn.spec.js +44 -0
  207. package/parser/functions/api/register.js +19 -0
  208. package/parser/functions/api/webflowRequestFn.js +47 -0
  209. package/parser/functions/api/webflowRequestFn.spec.js +114 -0
  210. package/parser/functions/apiFn.js +24 -0
  211. package/parser/functions/array/arrayDifferenceFn.js +37 -0
  212. package/parser/functions/array/arrayDifferenceFn.spec.js +34 -0
  213. package/parser/functions/array/arrayEveryFn.js +13 -0
  214. package/parser/functions/array/arrayFilterCountFn.js +14 -0
  215. package/parser/functions/array/arrayFilterFn.js +14 -0
  216. package/parser/functions/array/arrayFindFn.js +14 -0
  217. package/parser/functions/array/arrayFindFn.spec.js +44 -0
  218. package/parser/functions/array/arrayFindIndexFn.js +14 -0
  219. package/parser/functions/array/arrayGroupByFn.js +36 -0
  220. package/parser/functions/array/arrayGroupByFn.spec.js +41 -0
  221. package/parser/functions/array/arrayHasFn.js +14 -0
  222. package/parser/functions/array/arrayIntersectionFn.js +37 -0
  223. package/parser/functions/array/arrayIntersectionFn.spec.js +22 -0
  224. package/parser/functions/array/arrayMapFn.js +36 -0
  225. package/parser/functions/array/arrayMapFn.spec.js +37 -0
  226. package/parser/functions/array/arrayMergeFn.js +17 -0
  227. package/parser/functions/array/arrayNoValueAs.js +31 -0
  228. package/parser/functions/array/arrayNoValueAs.spec.js +56 -0
  229. package/parser/functions/array/arrayPartitionFn.js +19 -0
  230. package/parser/functions/array/arrayPartitionFn.spec.js +29 -0
  231. package/parser/functions/array/arrayPopFn.js +17 -0
  232. package/parser/functions/array/arrayPushFn.js +14 -0
  233. package/parser/functions/array/arrayShiftFn.js +15 -0
  234. package/parser/functions/array/arrayUnionFn.js +37 -0
  235. package/parser/functions/array/arrayUnionFn.spec.js +22 -0
  236. package/parser/functions/array/arrayUnshiftFn.js +14 -0
  237. package/parser/functions/array/arrayValueIfAs.js +51 -0
  238. package/parser/functions/array/arrayValueIfAs.spec.js +54 -0
  239. package/parser/functions/array/arrayValueOnly.js +40 -0
  240. package/parser/functions/array/arrayValueOnly.spec.js +61 -0
  241. package/parser/functions/array/register.js +49 -0
  242. package/parser/functions/array/valueAttrOnly.js +47 -0
  243. package/parser/functions/array/valueAttrOnly.spec.js +61 -0
  244. package/parser/functions/arrayFn.js +33 -0
  245. package/parser/functions/cloud/cloudAlgoliaFn.js +18 -0
  246. package/parser/functions/cloud/cloudAlgoliaRequestFn.js +26 -0
  247. package/parser/functions/cloud/cloudAlgoliaRequestFn.spec.js +30 -0
  248. package/parser/functions/cloud/cloudAwsFn.js +19 -0
  249. package/parser/functions/cloud/cloudAwsOpenSearchFn.js +19 -0
  250. package/parser/functions/cloud/cloudAwsS3Fn.js +22 -0
  251. package/parser/functions/cloud/cloudAwsS3Fn.spec.js +21 -0
  252. package/parser/functions/cloud/cloudAzureFn.js +18 -0
  253. package/parser/functions/cloud/cloudDeleteFileFn.js +23 -0
  254. package/parser/functions/cloud/cloudDeleteFileFn.spec.js +25 -0
  255. package/parser/functions/cloud/cloudElasticSearchFn.js +19 -0
  256. package/parser/functions/cloud/cloudGetFileInfoFn.js +24 -0
  257. package/parser/functions/cloud/cloudGetFileInfoFn.spec.js +25 -0
  258. package/parser/functions/cloud/cloudGoogleFn.js +18 -0
  259. package/parser/functions/cloud/cloudListDirectoryFn.js +24 -0
  260. package/parser/functions/cloud/cloudListDirectoryFn.spec.js +26 -0
  261. package/parser/functions/cloud/cloudReadFileFn.js +24 -0
  262. package/parser/functions/cloud/cloudReadFileFn.spec.js +25 -0
  263. package/parser/functions/cloud/cloudSearchDocumentFn.js +24 -0
  264. package/parser/functions/cloud/cloudSearchDocumentFn.spec.js +28 -0
  265. package/parser/functions/cloud/cloudSearchQueryFn.js +24 -0
  266. package/parser/functions/cloud/cloudSearchQueryFn.spec.js +32 -0
  267. package/parser/functions/cloud/cloudSearchRequestFn.js +24 -0
  268. package/parser/functions/cloud/cloudSearchRequestFn.spec.js +32 -0
  269. package/parser/functions/cloud/cloudSignUrlFn.js +24 -0
  270. package/parser/functions/cloud/cloudSignUrlFn.spec.js +26 -0
  271. package/parser/functions/cloud/cloudStorageFn.js +23 -0
  272. package/parser/functions/cloud/cloudStorageFn.spec.js +21 -0
  273. package/parser/functions/cloud/cloudUploadFileFn.js +24 -0
  274. package/parser/functions/cloud/cloudUploadFileFn.spec.js +29 -0
  275. package/parser/functions/cloud/register.js +61 -0
  276. package/parser/functions/cloudFn.js +21 -0
  277. package/parser/functions/controlFn.js +34 -0
  278. package/parser/functions/controls/awaitFn.js +21 -0
  279. package/parser/functions/controls/awaitFn.spec.js +48 -0
  280. package/parser/functions/controls/conditionalElifFn.js +19 -0
  281. package/parser/functions/controls/conditionalElseFn.js +13 -0
  282. package/parser/functions/controls/conditionalFn.js +62 -0
  283. package/parser/functions/controls/conditionalFn.spec.js +167 -0
  284. package/parser/functions/controls/conditionalIfFn.js +19 -0
  285. package/parser/functions/controls/forEachFn.js +70 -0
  286. package/parser/functions/controls/forEachFn.spec.js +101 -0
  287. package/parser/functions/controls/forFn.js +55 -0
  288. package/parser/functions/controls/forFn.spec.js +85 -0
  289. package/parser/functions/controls/functionCallFn.js +38 -0
  290. package/parser/functions/controls/functionRunFn.js +40 -0
  291. package/parser/functions/controls/functionRunFn.spec.js +77 -0
  292. package/parser/functions/controls/groupFn.js +42 -0
  293. package/parser/functions/controls/groupFn.spec.js +63 -0
  294. package/parser/functions/controls/preconditionFn.js +40 -0
  295. package/parser/functions/controls/preconditionFn.spec.js +97 -0
  296. package/parser/functions/controls/register.js +45 -0
  297. package/parser/functions/controls/returnFn.js +21 -0
  298. package/parser/functions/controls/returnFn.spec.js +44 -0
  299. package/parser/functions/controls/switchCaseFn.js +22 -0
  300. package/parser/functions/controls/switchDefaultFn.js +13 -0
  301. package/parser/functions/controls/switchFn.js +50 -0
  302. package/parser/functions/controls/switchFn.spec.js +104 -0
  303. package/parser/functions/controls/taskCallFn.js +31 -0
  304. package/parser/functions/controls/throwFn.js +21 -0
  305. package/parser/functions/controls/throwFn.spec.js +56 -0
  306. package/parser/functions/controls/tryCatchFn.js +67 -0
  307. package/parser/functions/controls/tryCatchFn.spec.js +180 -0
  308. package/parser/functions/controls/whileFn.js +52 -0
  309. package/parser/functions/controls/whileFn.spec.js +94 -0
  310. package/parser/functions/db/dbAddFn.js +38 -0
  311. package/parser/functions/db/dbAddFn.spec.js +72 -0
  312. package/parser/functions/db/dbAddOrEditFn.js +39 -0
  313. package/parser/functions/db/dbAddOrEditFn.spec.js +97 -0
  314. package/parser/functions/db/dbAddonAttr.js +17 -0
  315. package/parser/functions/db/dbBulkAddFn.js +54 -0
  316. package/parser/functions/db/dbBulkAddFn.spec.js +94 -0
  317. package/parser/functions/db/dbBulkDeleteFn.js +35 -0
  318. package/parser/functions/db/dbBulkDeleteFn.spec.js +28 -0
  319. package/parser/functions/db/dbBulkFn.js +20 -0
  320. package/parser/functions/db/dbBulkPatchFn.js +35 -0
  321. package/parser/functions/db/dbBulkPatchFn.spec.js +42 -0
  322. package/parser/functions/db/dbBulkUpdateFn.js +35 -0
  323. package/parser/functions/db/dbBulkUpdateFn.spec.js +42 -0
  324. package/parser/functions/db/dbDelFn.js +34 -0
  325. package/parser/functions/db/dbDelFn.spec.js +62 -0
  326. package/parser/functions/db/dbDirectQueryFn.js +37 -0
  327. package/parser/functions/db/dbDirectQueryFn.spec.js +104 -0
  328. package/parser/functions/db/dbEditFn.js +40 -0
  329. package/parser/functions/db/dbEditFn.spec.js +122 -0
  330. package/parser/functions/db/dbExternalDirectQueryFn.js +29 -0
  331. package/parser/functions/db/dbExternalDirectQueryFn.spec.js +103 -0
  332. package/parser/functions/db/dbExternalFn.js +29 -0
  333. package/parser/functions/db/dbGetFn.js +40 -0
  334. package/parser/functions/db/dbGetFn.spec.js +117 -0
  335. package/parser/functions/db/dbHasFn.js +34 -0
  336. package/parser/functions/db/dbHasFn.spec.js +62 -0
  337. package/parser/functions/db/dbPatchFn.js +39 -0
  338. package/parser/functions/db/dbPatchFn.spec.js +88 -0
  339. package/parser/functions/db/dbQueryFn.js +73 -0
  340. package/parser/functions/db/dbQueryFn.spec.js +333 -0
  341. package/parser/functions/db/dbSchemaFn.js +25 -0
  342. package/parser/functions/db/dbSchemaFn.spec.js +42 -0
  343. package/parser/functions/db/dbSetDatasourceFn.js +18 -0
  344. package/parser/functions/db/dbSetDatasourceFn.spec.js +44 -0
  345. package/parser/functions/db/dbTransactionFn.js +43 -0
  346. package/parser/functions/db/dbTransactionFn.spec.js +63 -0
  347. package/parser/functions/db/dbTruncateFn.js +33 -0
  348. package/parser/functions/db/dbTruncateFn.spec.js +42 -0
  349. package/parser/functions/db/register.js +52 -0
  350. package/parser/functions/db/schema.js +8 -0
  351. package/parser/functions/dbFn.js +31 -0
  352. package/parser/functions/debug/debugLogFn.js +21 -0
  353. package/parser/functions/debug/debugLogFn.spec.js +44 -0
  354. package/parser/functions/debug/debugStopFn.js +21 -0
  355. package/parser/functions/debug/debugStopFn.spec.js +44 -0
  356. package/parser/functions/debug/register.js +11 -0
  357. package/parser/functions/debugFn.js +18 -0
  358. package/parser/functions/expect/register.js +44 -0
  359. package/parser/functions/expect/unitExpectToBeWithinFn.js +28 -0
  360. package/parser/functions/expect/unitExpectToBeWithinFn.spec.js +61 -0
  361. package/parser/functions/expect/unitExpectToThrowFn.js +15 -0
  362. package/parser/functions/expect/unitExpectToThrowFn.spec.js +40 -0
  363. package/parser/functions/expect/unitExpectWithArgumentsFn.js +49 -0
  364. package/parser/functions/expect/unitExpectWithArgumentsFn.spec.js +341 -0
  365. package/parser/functions/expect/unitExpectWithoutArgumentsFn.js +42 -0
  366. package/parser/functions/expect/unitExpectWithoutArgumentsFn.spec.js +69 -0
  367. package/parser/functions/expect/workflowExpectToBeWithinFn.js +22 -0
  368. package/parser/functions/expect/workflowExpectToBeWithinFn.spec.js +70 -0
  369. package/parser/functions/expect/workflowExpectToThrowFn.js +21 -0
  370. package/parser/functions/expect/workflowExpectToThrowFn.spec.js +56 -0
  371. package/parser/functions/expect/workflowExpectWithArgumentsFn.js +40 -0
  372. package/parser/functions/expect/workflowExpectWithArgumentsFn.spec.js +301 -0
  373. package/parser/functions/expect/workflowExpectWithoutArgumentsFn.js +39 -0
  374. package/parser/functions/expect/workflowExpectWithoutArgumentsFn.spec.js +87 -0
  375. package/parser/functions/math/allMathFn.js +64 -0
  376. package/parser/functions/math/allMathFn.spec.js +100 -0
  377. package/parser/functions/math/register.js +9 -0
  378. package/parser/functions/mathFn.js +15 -0
  379. package/parser/functions/middlewareCallFn.js +43 -0
  380. package/parser/functions/middlewareCallFn.spec.js +44 -0
  381. package/parser/functions/object/objectEntriesFn.js +22 -0
  382. package/parser/functions/object/objectEntriesFn.spec.js +44 -0
  383. package/parser/functions/object/objectKeysFn.js +22 -0
  384. package/parser/functions/object/objectKeysFn.spec.js +44 -0
  385. package/parser/functions/object/objectValuesFn.js +22 -0
  386. package/parser/functions/object/objectValuesFn.spec.js +44 -0
  387. package/parser/functions/object/register.js +13 -0
  388. package/parser/functions/objectFn.js +22 -0
  389. package/parser/functions/redis/redisCountFn.js +26 -0
  390. package/parser/functions/redis/redisCountFn.spec.js +58 -0
  391. package/parser/functions/redis/redisDecrFn.js +28 -0
  392. package/parser/functions/redis/redisDecrFn.spec.js +47 -0
  393. package/parser/functions/redis/redisDelFn.js +25 -0
  394. package/parser/functions/redis/redisDelFn.spec.js +58 -0
  395. package/parser/functions/redis/redisGetFn.js +26 -0
  396. package/parser/functions/redis/redisGetFn.spec.js +67 -0
  397. package/parser/functions/redis/redisHasFn.js +26 -0
  398. package/parser/functions/redis/redisHasFn.spec.js +58 -0
  399. package/parser/functions/redis/redisIncrFn.js +28 -0
  400. package/parser/functions/redis/redisIncrFn.spec.js +74 -0
  401. package/parser/functions/redis/redisKeysFn.js +26 -0
  402. package/parser/functions/redis/redisKeysFn.spec.js +67 -0
  403. package/parser/functions/redis/redisPopFn.js +26 -0
  404. package/parser/functions/redis/redisPopFn.spec.js +67 -0
  405. package/parser/functions/redis/redisPushFn.js +28 -0
  406. package/parser/functions/redis/redisPushFn.spec.js +71 -0
  407. package/parser/functions/redis/redisRangeFn.js +30 -0
  408. package/parser/functions/redis/redisRangeFn.spec.js +80 -0
  409. package/parser/functions/redis/redisRateLimitFn.js +32 -0
  410. package/parser/functions/redis/redisRateLimitFn.spec.js +87 -0
  411. package/parser/functions/redis/redisRemoveFn.js +29 -0
  412. package/parser/functions/redis/redisRemoveFn.spec.js +65 -0
  413. package/parser/functions/redis/redisSetFn.js +29 -0
  414. package/parser/functions/redis/redisSetFn.spec.js +89 -0
  415. package/parser/functions/redis/redisShiftFn.js +26 -0
  416. package/parser/functions/redis/redisShiftFn.spec.js +67 -0
  417. package/parser/functions/redis/redisUnshiftFn.js +28 -0
  418. package/parser/functions/redis/redisUnshiftFn.spec.js +73 -0
  419. package/parser/functions/redis/register.js +37 -0
  420. package/parser/functions/redisFn.js +31 -0
  421. package/parser/functions/register.js +91 -0
  422. package/parser/functions/schema/register.js +30 -0
  423. package/parser/functions/schema/schemaFn.js +173 -0
  424. package/parser/functions/schema/schemaFn.spec.js +92 -0
  425. package/parser/functions/schema/schemaParseArrayFn.js +47 -0
  426. package/parser/functions/schema/schemaParseArrayFn.spec.js +134 -0
  427. package/parser/functions/schema/schemaParseAttributeFn.js +194 -0
  428. package/parser/functions/schema/schemaParseAttributeFn.spec.js +281 -0
  429. package/parser/functions/schema/schemaParseConstantFn.js +136 -0
  430. package/parser/functions/schema/schemaParseConstantFn.spec.js +122 -0
  431. package/parser/functions/schema/schemaParseEnum.js +52 -0
  432. package/parser/functions/schema/schemaParseEnum.spec.js +47 -0
  433. package/parser/functions/schema/schemaParseImmutableFn.js +134 -0
  434. package/parser/functions/schema/schemaParseImmutableFn.spec.js +99 -0
  435. package/parser/functions/schema/schemaParseObjectFn.js +171 -0
  436. package/parser/functions/schema/schemaParseObjectFn.spec.js +223 -0
  437. package/parser/functions/schema/utils.js +136 -0
  438. package/parser/functions/schema/utils.spec.js +27 -0
  439. package/parser/functions/security/register.js +64 -0
  440. package/parser/functions/security/securityCheckPasswordFn.js +24 -0
  441. package/parser/functions/security/securityCheckPasswordFn.spec.js +22 -0
  442. package/parser/functions/security/securityCreateAuthTokenFn.js +24 -0
  443. package/parser/functions/security/securityCreateAuthTokenFn.spec.js +24 -0
  444. package/parser/functions/security/securityCreateCurveKeyFn.js +19 -0
  445. package/parser/functions/security/securityCreateCurveKeyFn.spec.js +22 -0
  446. package/parser/functions/security/securityCreatePasswordFn.js +26 -0
  447. package/parser/functions/security/securityCreatePasswordFn.spec.js +26 -0
  448. package/parser/functions/security/securityCreateRsaKeyFn.js +19 -0
  449. package/parser/functions/security/securityCreateRsaKeyFn.spec.js +22 -0
  450. package/parser/functions/security/securityCreateSecretKeyFn.js +24 -0
  451. package/parser/functions/security/securityCreateSecretKeyFn.spec.js +22 -0
  452. package/parser/functions/security/securityCreateUuidFn.js +26 -0
  453. package/parser/functions/security/securityCreateUuidFn.spec.js +27 -0
  454. package/parser/functions/security/securityDecryptFn.js +24 -0
  455. package/parser/functions/security/securityDecryptFn.spec.js +24 -0
  456. package/parser/functions/security/securityEncryptFn.js +24 -0
  457. package/parser/functions/security/securityEncryptFn.spec.js +24 -0
  458. package/parser/functions/security/securityJweDecodeFn.js +24 -0
  459. package/parser/functions/security/securityJweDecodeFn.spec.js +26 -0
  460. package/parser/functions/security/securityJweEncodeFn.js +24 -0
  461. package/parser/functions/security/securityJweEncodeFn.spec.js +26 -0
  462. package/parser/functions/security/securityJwsDecodeFn.js +24 -0
  463. package/parser/functions/security/securityJwsDecodeFn.spec.js +25 -0
  464. package/parser/functions/security/securityJwsEncodeFn.js +24 -0
  465. package/parser/functions/security/securityJwsEncodeFn.spec.js +25 -0
  466. package/parser/functions/security/securityRandomBytesFn.js +24 -0
  467. package/parser/functions/security/securityRandomBytesFn.spec.js +21 -0
  468. package/parser/functions/security/securityRandomNumberFn.js +24 -0
  469. package/parser/functions/security/securityRandomNumberFn.spec.js +22 -0
  470. package/parser/functions/securityFn.js +30 -0
  471. package/parser/functions/storage/register.js +44 -0
  472. package/parser/functions/storage/storageCreateAttachmentFn.js +25 -0
  473. package/parser/functions/storage/storageCreateAttachmentFn.spec.js +87 -0
  474. package/parser/functions/storage/storageCreateAudioFn.js +29 -0
  475. package/parser/functions/storage/storageCreateAudioFn.spec.js +98 -0
  476. package/parser/functions/storage/storageCreateFileResourceFn.js +19 -0
  477. package/parser/functions/storage/storageCreateFileResourceFn.spec.js +72 -0
  478. package/parser/functions/storage/storageCreateImageFn.js +25 -0
  479. package/parser/functions/storage/storageCreateImageFn.spec.js +98 -0
  480. package/parser/functions/storage/storageCreateVideoFn.js +29 -0
  481. package/parser/functions/storage/storageCreateVideoFn.spec.js +99 -0
  482. package/parser/functions/storage/storageDeleteFileFn.js +17 -0
  483. package/parser/functions/storage/storageDeleteFileFn.spec.js +67 -0
  484. package/parser/functions/storage/storageReadFileResourceFn.js +19 -0
  485. package/parser/functions/storage/storageReadFileResourceFn.spec.js +60 -0
  486. package/parser/functions/storage/storageSignPrivateUrlFn.js +19 -0
  487. package/parser/functions/storage/storageSignPrivateUrlFn.spec.js +72 -0
  488. package/parser/functions/storageFn.js +24 -0
  489. package/parser/functions/stream/register.js +13 -0
  490. package/parser/functions/stream/streamFromCsvFn.js +20 -0
  491. package/parser/functions/stream/streamFromCsvFn.spec.js +69 -0
  492. package/parser/functions/stream/streamFromJsonlFn.js +21 -0
  493. package/parser/functions/stream/streamFromJsonlFn.spec.js +47 -0
  494. package/parser/functions/stream/streamFromRequestFn.js +50 -0
  495. package/parser/functions/stream/streamFromRequestFn.spec.js +103 -0
  496. package/parser/functions/streamFn.js +19 -0
  497. package/parser/functions/text/allTextWithReturnValueFn.js +36 -0
  498. package/parser/functions/text/allTextWithReturnValueFn.spec.js +100 -0
  499. package/parser/functions/text/allTextWithoutReturnValueFn.js +34 -0
  500. package/parser/functions/text/allTextWithoutReturnValueFn.spec.js +122 -0
  501. package/parser/functions/text/register.js +17 -0
  502. package/parser/functions/textFn.js +33 -0
  503. package/parser/functions/toolCallFn.js +40 -0
  504. package/parser/functions/toolCallFn.spec.js +28 -0
  505. package/parser/functions/unitExpectFn.js +20 -0
  506. package/parser/functions/unitExpectFn.spec.js +21 -0
  507. package/parser/functions/util/register.js +29 -0
  508. package/parser/functions/util/utilGeoDistanceFn.js +30 -0
  509. package/parser/functions/util/utilGeoDistanceFn.spec.js +79 -0
  510. package/parser/functions/util/utilGetAllInputFn.js +20 -0
  511. package/parser/functions/util/utilGetAllInputFn.spec.js +33 -0
  512. package/parser/functions/util/utilGetEnvFn.js +20 -0
  513. package/parser/functions/util/utilGetEnvFn.spec.js +33 -0
  514. package/parser/functions/util/utilGetRawInputFn.js +25 -0
  515. package/parser/functions/util/utilGetRawInputFn.spec.js +55 -0
  516. package/parser/functions/util/utilGetVarsFn.js +20 -0
  517. package/parser/functions/util/utilGetVarsFn.spec.js +33 -0
  518. package/parser/functions/util/utilIpLookupFn.js +22 -0
  519. package/parser/functions/util/utilIpLookupFn.spec.js +37 -0
  520. package/parser/functions/util/utilPostProcessFn.js +43 -0
  521. package/parser/functions/util/utilPostProcessFn.spec.js +63 -0
  522. package/parser/functions/util/utilSendEmailFn.js +108 -0
  523. package/parser/functions/util/utilSendEmailFn.spec.js +62 -0
  524. package/parser/functions/util/utilSetHeaderFn.js +22 -0
  525. package/parser/functions/util/utilSetHeaderFn.spec.js +48 -0
  526. package/parser/functions/util/utilSleepFn.js +19 -0
  527. package/parser/functions/util/utilSleepFn.spec.js +44 -0
  528. package/parser/functions/util/utilTemplateFn.js +19 -0
  529. package/parser/functions/util/utilTemplateFn.spec.js +78 -0
  530. package/parser/functions/utilFn.js +39 -0
  531. package/parser/functions/varFn.js +51 -0
  532. package/parser/functions/varFn.spec.js +173 -0
  533. package/parser/functions/webflowFn.js +19 -0
  534. package/parser/functions/workflowExpectFn.js +20 -0
  535. package/parser/functions/zip/register.js +20 -0
  536. package/parser/functions/zip/zipAddToArchiveFn.js +31 -0
  537. package/parser/functions/zip/zipAddToArchiveFn.spec.js +78 -0
  538. package/parser/functions/zip/zipCreateArchiveFn.js +29 -0
  539. package/parser/functions/zip/zipCreateArchiveFn.spec.js +53 -0
  540. package/parser/functions/zip/zipDeleteFromArchiveFn.js +23 -0
  541. package/parser/functions/zip/zipDeleteFromArchiveFn.spec.js +69 -0
  542. package/parser/functions/zip/zipExtractFn.js +23 -0
  543. package/parser/functions/zip/zipExtractFn.spec.js +52 -0
  544. package/parser/functions/zip/zipViewContentsFn.js +24 -0
  545. package/parser/functions/zip/zipViewContentsFn.spec.js +52 -0
  546. package/parser/functions/zipFn.js +21 -0
  547. package/parser/generic/arrayOfObjectAttrReq.js +47 -0
  548. package/parser/generic/arrayOfObjectAttrReq.spec.js +254 -0
  549. package/parser/generic/arrayOfStringLiterals.js +45 -0
  550. package/parser/generic/arrayOfStringLiterals.spec.js +56 -0
  551. package/parser/generic/arrayWithValues.js +35 -0
  552. package/parser/generic/arrayWithValues.spec.js +72 -0
  553. package/parser/generic/asVariable.js +23 -0
  554. package/parser/generic/asVariable.spec.js +37 -0
  555. package/parser/generic/assignableVariableAs.js +27 -0
  556. package/parser/generic/assignableVariableAs.spec.js +52 -0
  557. package/parser/generic/assignableVariableProperty.js +52 -0
  558. package/parser/generic/assignableVariableProperty.spec.js +52 -0
  559. package/parser/generic/booleanValue.js +22 -0
  560. package/parser/generic/bracketAccessor.js +53 -0
  561. package/parser/generic/castedValue.js +14 -0
  562. package/parser/generic/castedValue.spec.js +29 -0
  563. package/parser/generic/chainedIdentifier.js +48 -0
  564. package/parser/generic/chainedIdentifier.spec.js +89 -0
  565. package/parser/generic/completeAuthVariable.js +13 -0
  566. package/parser/generic/completeAuthVariable.spec.js +23 -0
  567. package/parser/generic/completeEnvVariable.js +79 -0
  568. package/parser/generic/completeEnvVariable.spec.js +94 -0
  569. package/parser/generic/completeErrorVariable.js +39 -0
  570. package/parser/generic/completeErrorVariable.spec.js +17 -0
  571. package/parser/generic/completeInputVariable.js +42 -0
  572. package/parser/generic/completeInputVariable.spec.js +53 -0
  573. package/parser/generic/enumValue.js +23 -0
  574. package/parser/generic/expressionFn.js +415 -0
  575. package/parser/generic/expressionFn.spec.js +588 -0
  576. package/parser/generic/filterFn.js +48 -0
  577. package/parser/generic/filterFn.spec.js +47 -0
  578. package/parser/generic/filterNames.js +381 -0
  579. package/parser/generic/functionAttrReq.js +279 -0
  580. package/parser/generic/functionAttrReq.spec.js +353 -0
  581. package/parser/generic/longFormVariable.js +46 -0
  582. package/parser/generic/longFormVariable.spec.js +25 -0
  583. package/parser/generic/minimalFnBody.js +24 -0
  584. package/parser/generic/minimalFnBody.spec.js +47 -0
  585. package/parser/generic/mockAttribute.js +21 -0
  586. package/parser/generic/mockAttribute.spec.js +57 -0
  587. package/parser/generic/multilineFilterFn.js +27 -0
  588. package/parser/generic/multilineFilterFn.spec.js +51 -0
  589. package/parser/generic/numberValue.js +27 -0
  590. package/parser/generic/objectAttrReq.js +243 -0
  591. package/parser/generic/objectAttrReq.spec.js +412 -0
  592. package/parser/generic/objectWithAttributes.js +74 -0
  593. package/parser/generic/objectWithAttributes.spec.js +147 -0
  594. package/parser/generic/optionalCommentBlock.js +32 -0
  595. package/parser/generic/pipedFilter.js +20 -0
  596. package/parser/generic/register.js +124 -0
  597. package/parser/generic/requiredValueFnBody.js +40 -0
  598. package/parser/generic/requiredValueFnBody.spec.js +56 -0
  599. package/parser/generic/shortFormVariable.js +17 -0
  600. package/parser/generic/shortFormVariable.spec.js +27 -0
  601. package/parser/generic/stringArray.js +33 -0
  602. package/parser/generic/stringArray.spec.js +55 -0
  603. package/parser/generic/tagsAttribute.js +14 -0
  604. package/parser/generic/tagsAttribute.spec.js +47 -0
  605. package/parser/generic/utils.js +14 -0
  606. package/parser/generic/valueExpressionForResponse.js +51 -0
  607. package/parser/generic/variableOnly.js +13 -0
  608. package/parser/generic/variableOnly.spec.js +47 -0
  609. package/parser/mcp_server_parser.js +130 -0
  610. package/parser/mcp_server_parser.spec.js +478 -0
  611. package/parser/mcp_server_trigger_parser.js +142 -0
  612. package/parser/mcp_server_trigger_parser.spec.js +396 -0
  613. package/parser/metadata/columnMetadataDefinition.js +32 -0
  614. package/parser/metadata/columnMetadataDefinition.spec.js +47 -0
  615. package/parser/metadata/enumColumnMetadataDefinition.js +46 -0
  616. package/parser/metadata/enumColumnMetadataDefinition.spec.js +59 -0
  617. package/parser/metadata/objectColumnMetadataDefinition.js +26 -0
  618. package/parser/metadata/register.js +22 -0
  619. package/parser/middleware_parser.js +137 -0
  620. package/parser/middleware_parser.spec.js +203 -0
  621. package/parser/parser.js +87 -0
  622. package/parser/query_parser.js +183 -0
  623. package/parser/query_parser.spec.js +141 -0
  624. package/parser/realtime_channel_parser.js +45 -0
  625. package/parser/realtime_channel_parser.spec.js +20 -0
  626. package/parser/realtime_trigger_parser.js +141 -0
  627. package/parser/realtime_trigger_parser.spec.js +469 -0
  628. package/parser/register.js +88 -0
  629. package/parser/table_parser.js +126 -0
  630. package/parser/table_parser.spec.js +138 -0
  631. package/parser/table_trigger_parser.js +144 -0
  632. package/parser/table_trigger_parser.spec.js +449 -0
  633. package/parser/task_parser.js +116 -0
  634. package/parser/task_parser.spec.js +83 -0
  635. package/parser/test_parser.js +39 -0
  636. package/parser/tests/agent/agent_parser.spec.js +52 -0
  637. package/parser/tests/agent/valid_sources/customer_servier_agent.xs +45 -0
  638. package/parser/tests/api_group/api_group_parser.spec.js +52 -0
  639. package/parser/tests/api_group/valid_sources/api_group_history.xs +4 -0
  640. package/parser/tests/api_group/valid_sources/basic_api_group.xs +3 -0
  641. package/parser/tests/api_group/valid_sources/complete_api_group.xs +7 -0
  642. package/parser/tests/api_group/valid_sources/protected_api_group.xs +7 -0
  643. package/parser/tests/function/function_parser.spec.js +52 -0
  644. package/parser/tests/function/valid_sources/all_controls.xs +68 -0
  645. package/parser/tests/function/valid_sources/all_query_return_types.xs +227 -0
  646. package/parser/tests/function/valid_sources/all_storage.xs +45 -0
  647. package/parser/tests/function/valid_sources/discord_poll_send_to_slack.xs +133 -0
  648. package/parser/tests/function/valid_sources/expression_in_response.xs +22 -0
  649. package/parser/tests/function/valid_sources/filter_by_value.xs +55 -0
  650. package/parser/tests/function/valid_sources/filter_query.xs +82 -0
  651. package/parser/tests/function/valid_sources/large_regex.xs +13 -0
  652. package/parser/tests/function/valid_sources/ledash_ends_with.xs +90 -0
  653. package/parser/tests/function/valid_sources/multiline_description.xs +28 -0
  654. package/parser/tests/function/valid_sources/multiline_expr.xs +41 -0
  655. package/parser/tests/function/valid_sources/set_theory_fn.xs +129 -0
  656. package/parser/tests/function/valid_sources/simple_unit_test.xs +33 -0
  657. package/parser/tests/function/valid_sources/valid_officer.xs +57 -0
  658. package/parser/tests/function/valid_sources/webflow.xs +18 -0
  659. package/parser/tests/query/query_parser.spec.js +54 -0
  660. package/parser/tests/query/valid_sources/all_basics.xs +51 -0
  661. package/parser/tests/query/valid_sources/all_cloud.xs +141 -0
  662. package/parser/tests/query/valid_sources/all_db.xs +102 -0
  663. package/parser/tests/query/valid_sources/all_external_db.xs +43 -0
  664. package/parser/tests/query/valid_sources/all_keywords.xs +65 -0
  665. package/parser/tests/query/valid_sources/all_math.xs +53 -0
  666. package/parser/tests/query/valid_sources/all_object.xs +25 -0
  667. package/parser/tests/query/valid_sources/all_redis.xs +106 -0
  668. package/parser/tests/query/valid_sources/all_security.xs +105 -0
  669. package/parser/tests/query/valid_sources/all_stream.xs +69 -0
  670. package/parser/tests/query/valid_sources/all_text.xs +54 -0
  671. package/parser/tests/query/valid_sources/all_util.xs +66 -0
  672. package/parser/tests/query/valid_sources/all_zip.xs +39 -0
  673. package/parser/tests/query/valid_sources/arrays.xs +33 -0
  674. package/parser/tests/query/valid_sources/disabled_response.xs +27 -0
  675. package/parser/tests/query/valid_sources/multiline_lambda_GET.xs +50 -0
  676. package/parser/tests/query/valid_sources/mutliline_query.xs +140 -0
  677. package/parser/tests/query/valid_sources/patch_expression_multiline.xs +27 -0
  678. package/parser/tests/query/valid_sources/query_cache.xs +34 -0
  679. package/parser/tests/query/valid_sources/query_example.xs +43 -0
  680. package/parser/tests/query/valid_sources/query_mini.xs +11 -0
  681. package/parser/tests/query/valid_sources/query_rich_inputs.xs +32 -0
  682. package/parser/tests/query/valid_sources/simple_unit_test.xs +33 -0
  683. package/parser/tests/query/valid_sources/test_with_slashes.xs +22 -0
  684. package/parser/tests/query/valid_sources/with_unit_test.xs +97 -0
  685. package/parser/tests/table/table_parser.spec.js +52 -0
  686. package/parser/tests/table/valid_sources/account.xs +31 -0
  687. package/parser/tests/table/valid_sources/all_basic_columns.xs +44 -0
  688. package/parser/tests/table/valid_sources/basic_table.xs +15 -0
  689. package/parser/tests/table/valid_sources/empty_object.xs +17 -0
  690. package/parser/tests/table/valid_sources/empty_table.xs +3 -0
  691. package/parser/tests/table/valid_sources/multiline_index.xs +33 -0
  692. package/parser/tests/table/valid_sources/relation.xs +44 -0
  693. package/parser/tests/table/valid_sources/rich_columns.xs +28 -0
  694. package/parser/tests/table/valid_sources/table_with_comments.xs +17 -0
  695. package/parser/tests/table/valid_sources/table_with_search_index.xs +31 -0
  696. package/parser/tests/table/valid_sources/view_table.xs +62 -0
  697. package/parser/tests/task/task_parser.spec.js +53 -0
  698. package/parser/tests/task/valid_sources/active_event.xs +11 -0
  699. package/parser/tests/task/valid_sources/all_events.xs +17 -0
  700. package/parser/tests/task/valid_sources/daily_sales_report.xs +56 -0
  701. package/parser/tests/task/valid_sources/inactive_event.xs +11 -0
  702. package/parser/tests/workflow_test/valid_sources/basic_workflow_test.xs +13 -0
  703. package/parser/tests/workflow_test/workflow_test_parser.spec.js +52 -0
  704. package/parser/tool_parser.js +121 -0
  705. package/parser/tool_parser.spec.js +102 -0
  706. package/parser/workflow_test_parser.js +73 -0
  707. package/parser/workflow_test_parser.spec.js +71 -0
  708. package/parser/workspace_parser.js +38 -0
  709. package/parser/workspace_parser.spec.js +142 -0
  710. package/parser/workspace_trigger_parser.js +118 -0
  711. package/parser/workspace_trigger_parser.spec.js +332 -0
  712. package/profile-parser.js +214 -0
  713. package/server.js +59 -0
  714. package/toTmLanguage.js +75 -0
  715. package/utils.js +55 -0
  716. package/utils.spec.js +277 -0
@@ -0,0 +1,2852 @@
1
+ # deg2rad
2
+
3
+ Convert degrees to radians
4
+
5
+ ```xs
6
+ 180|deg2rad
7
+ ```
8
+
9
+ Result: `3.141592...`
10
+
11
+ # rad2deg
12
+
13
+ Convert radians to degrees
14
+
15
+ ```xs
16
+ 3.141592|rad2deg
17
+ ```
18
+
19
+ Result: `180`
20
+
21
+ # number_format
22
+
23
+ Format a number with flexible support over decimal places, thousands separator, and decimal separator.
24
+
25
+ ```xs
26
+ 31253212.141592|number_format:2:.:,
27
+ ```
28
+
29
+ Result: `"31,253,212.14"`
30
+
31
+ # sin
32
+
33
+ Calculates the sine of the supplied value in radians
34
+
35
+ ```xs
36
+ 3.14159|sin
37
+ ```
38
+
39
+ Result: `0`
40
+
41
+ # asin
42
+
43
+ Calculates the arc sine of the supplied value in radians
44
+
45
+ ```xs
46
+ 1|asin
47
+ ```
48
+
49
+ Result: `1.57079...`
50
+
51
+ # asinh
52
+
53
+ Calculates the inverse hyperbolic sine of the supplied value in radians
54
+
55
+ ```xs
56
+ 1|asinh
57
+ ```
58
+
59
+ Result: `0.88137...`
60
+
61
+ # cos
62
+
63
+ Calculates the cosine of the supplied value in radians
64
+
65
+ ```xs
66
+ 1|cos
67
+ ```
68
+
69
+ Result: `0.54030...`
70
+
71
+ # acos
72
+
73
+ Calculates the arc cosine of the supplied value in radians
74
+
75
+ ```xs
76
+ 1|acos
77
+ ```
78
+
79
+ Result: `0`
80
+
81
+ # acosh
82
+
83
+ Calculates the inverse hyperbolic cosine of the supplied value in radians
84
+
85
+ ```xs
86
+ 11.592|acosh
87
+ ```
88
+
89
+ Result: `3.14159...`
90
+
91
+ # tan
92
+
93
+ Calculates the tangent of the supplied value in radians
94
+
95
+ ```xs
96
+ 0.785398|tan
97
+ ```
98
+
99
+ Result: `1`
100
+
101
+ # atan
102
+
103
+ Calculates the arc tangent of the supplied value in radians
104
+
105
+ ```xs
106
+ 1|atan
107
+ ```
108
+
109
+ Result: `0.78539...`
110
+
111
+ # atanh
112
+
113
+ Calculates the inverse hyperbolic tangent of the supplied value in radians
114
+
115
+ ```xs
116
+ 0.6666|atanh
117
+ ```
118
+
119
+ Result: `0.80470...`
120
+
121
+ # floor
122
+
123
+ Round a decimal down to its integer equivalent
124
+
125
+ ```xs
126
+ 2.5|floor
127
+ ```
128
+
129
+ Result: `2`
130
+
131
+ # ceil
132
+
133
+ Round a decimal up to its integer equivalent
134
+
135
+ ```xs
136
+ 2.5|ceil
137
+ ```
138
+
139
+ Result: `3`
140
+
141
+ # round
142
+
143
+ Round a decimal with optional precision
144
+
145
+ ```xs
146
+ 2.5432|round:1
147
+ ```
148
+
149
+ Result: `3`
150
+
151
+ # first
152
+
153
+ Get the first entry of an array
154
+
155
+ ```xs
156
+ ["five","six","seven"]|first
157
+ ```
158
+
159
+ Result: `"five"`
160
+
161
+ # last
162
+
163
+ Get the last entry of an array
164
+
165
+ ```xs
166
+ ["five","six","seven"]|last
167
+ ```
168
+
169
+ Result: `"seven"`
170
+
171
+ # count
172
+
173
+ Return the number of items in an object/array
174
+
175
+ ```xs
176
+ ["five","six","seven"]|count
177
+ ```
178
+
179
+ Result: `3`
180
+
181
+ # range
182
+
183
+ Returns array of values between the specified start/stop.
184
+
185
+ ```xs
186
+ |range:10:15
187
+ ```
188
+
189
+ Result: `[10,11,12,13,14,15]`
190
+
191
+ # reverse
192
+
193
+ Returns values of an array in reverse order
194
+
195
+ ```xs
196
+ [12,13,14,15]|reverse
197
+ ```
198
+
199
+ Result: `[15,14,13,12]`
200
+
201
+ # unique
202
+
203
+ Returns unique values of an array
204
+
205
+ ```xs
206
+ [12,13,13,12,11]|unique
207
+ ```
208
+
209
+ Result: `[12,13,11]`
210
+
211
+ # safe_array
212
+
213
+ Always returns an array. Uses the existing value if it is an array or creates an array of one element.
214
+
215
+ ```xs
216
+ 12|safe_array
217
+ ```
218
+
219
+ Result: `[12]`
220
+
221
+ # flatten
222
+
223
+ Flattens a multidimensional array into a single level array of values.
224
+
225
+ ```xs
226
+ [1,[2,3],[[4,5]]]|flatten
227
+ ```
228
+
229
+ Result: `[1,2,3,4,5]`
230
+
231
+ # filter_empty
232
+
233
+ Returns a new array with only entries that are not empty ("", null, 0, "0", false, [], {})
234
+
235
+ ```xs
236
+ [{a:1, b:null}, {a:0, b:4}]|filter_empty:a
237
+ ```
238
+
239
+ Result: `[{a:1, b:null}]`
240
+
241
+ # filter_empty_text
242
+
243
+ Returns a new array with only entries that are not empty ("", null, 0, "0", false, [], {})
244
+
245
+ ```xs
246
+ [{a:"x", b:null}, {a:"", b:4}]|filter_empty_text:a
247
+ ```
248
+
249
+ Result:
250
+
251
+ ```json
252
+ [
253
+ {
254
+ "a": "x",
255
+ "b": null
256
+ }
257
+ ]
258
+ ```
259
+
260
+ # filter_empty_array
261
+
262
+ Returns a new array with only entries that are not an empty array `[]`
263
+
264
+ ```xs
265
+ [{a:[1,2], b:null}, {a:[], b:4}]|filter_empty_array:a
266
+ ```
267
+
268
+ Result:
269
+
270
+ ```json
271
+ [
272
+ {
273
+ "a": [1, 2],
274
+ "b": null
275
+ }
276
+ ]
277
+ ```
278
+
279
+ # filter_null
280
+
281
+ Returns a new array with only entries that are not null
282
+
283
+ ```xs
284
+ [{a:1, b:null}, {a:null, b:4}]|filter_null:a
285
+ ```
286
+
287
+ Result:
288
+
289
+ ```json
290
+ [
291
+ {
292
+ "a": 1,
293
+ "b": null
294
+ }
295
+ ]
296
+ ```
297
+
298
+ # filter_empty_object
299
+
300
+ Returns a new array with only entries that are not an empty object `{}`
301
+
302
+ ```xs
303
+ [{a:{x:1}, b:null}, {a:{}, b:4}]|filter_empty_object:a
304
+ ```
305
+
306
+ Result:
307
+
308
+ ```json
309
+ [
310
+ {
311
+ "a": { "x": 1 },
312
+ "b": null
313
+ }
314
+ ]
315
+ ```
316
+
317
+ # filter_zero
318
+
319
+ Returns a new array with only entries that are not zero
320
+
321
+ ```xs
322
+ [{a:1, b:null}, {a:0, b:4}]|filter_zero:"a"
323
+ ```
324
+
325
+ Result:
326
+
327
+ ```json
328
+ [
329
+ {
330
+ "a": 1,
331
+ "b": null
332
+ }
333
+ ]
334
+ ```
335
+
336
+ # filter_false
337
+
338
+ Returns a new array with only entries that are not false
339
+
340
+ ```xs
341
+ [{a:true, b:null}, {a:false, b:4}]|filter_false:"a"
342
+ ```
343
+
344
+ Result:
345
+
346
+ ```json
347
+ [
348
+ {
349
+ "a": true,
350
+ "b": null
351
+ }
352
+ ]
353
+ ```
354
+
355
+ # sort
356
+
357
+ Sort an array of elements with an optional path inside the element
358
+
359
+ ```xs
360
+ [{v:"a", e:20}, {v:"z", e:10}]|sort:v:text:true
361
+ ```
362
+
363
+ Result: `[{v:"z", e:10}, {v:"a", e:20}]`
364
+
365
+ # !fsort:sort
366
+
367
+ Sort an array of elements with an optional path inside the element
368
+
369
+ ```xs
370
+ [{v:"a", e:20}, {v:"z", e:10}]|fsort:v:text:true
371
+ ```
372
+
373
+ Result: `[{v:"z", e:10}, {v:"a", e:20}]`
374
+
375
+ # shuffle
376
+
377
+ Shuffles the order of the entries in the array.
378
+
379
+ ```xs
380
+ [1,2,3,4]|shuffle
381
+ ```
382
+
383
+ Result: `[3,2,4,1]`
384
+
385
+ # !array_shuffle:shuffle
386
+
387
+ Shuffles the order of the entries in the array.
388
+
389
+ ```xs
390
+ [1,2,3,4]|array_shuffle
391
+ ```
392
+
393
+ Result: `[3,2,4,1]`
394
+
395
+ # diff
396
+
397
+ Return the entries from the first array that are not in the second array. Only values are used for matching.
398
+
399
+ ```xs
400
+ [1,2,3,4]|diff:[3,2]
401
+ ```
402
+
403
+ Result: `[1,4]`
404
+
405
+ # !array_diff:diff
406
+
407
+ Return the entries from the first array that are not in the second array. Only values are used for matching.
408
+
409
+ ```xs
410
+ [1,2,3,4]|array_diff:[3,2]
411
+ ```
412
+
413
+ Result: `[1,4]`
414
+
415
+ # diff_assoc
416
+
417
+ Return the entries from the first array that are not in the second array. Values and keys are used for matching.
418
+
419
+ ```xs
420
+ [{"a": "green"},{"b": "brown"},{"c":"blue"},"red"]|diff_assoc:[{"a":"green"}, "yellow", "red"]
421
+ ```
422
+
423
+ Result: `[{a: "green",b: "brown", "red"]`
424
+
425
+ # !array_diff_assoc:diff_assoc
426
+
427
+ Return the entries from the first array that are not in the second array. Values and keys are used for matching.
428
+
429
+ ```xs
430
+ [{"a": "green"},{"b": "brown"},{"c":"blue"},"red"]|array_diff_assoc:[{"a":"green"}, "yellow", "red"]
431
+ ```
432
+
433
+ Result: `[{a: "green",b: "brown", "red"]`
434
+
435
+ # intersect
436
+
437
+ Return the entries from the first array that are also present in the second array. Only values are used for matching.
438
+
439
+ ```xs
440
+ [1,2,3,4]|intersect:[3,2]
441
+ ```
442
+
443
+ Result: `[2,3]`
444
+
445
+ # !array_intersect:intersect
446
+
447
+ Return the entries from the first array that are also present in the second array. Only values are used for matching.
448
+
449
+ ```xs
450
+ [1,2,3,4]|array_intersect:[3,2]
451
+ ```
452
+
453
+ Result: `[2,3]`
454
+
455
+ # intersect_assoc
456
+
457
+ Return the entries from the first array that are also present in the second array. Values and keys are used for matching.
458
+
459
+ ```xs
460
+ [{"a": "green"},{"b": "brown"},{"c":"blue"},"red"]|intersect_assoc:[{"a":"green"},{"b":"yellow"},"blue","red"]
461
+ ```
462
+
463
+ Result: `[{a: "green",b: "brown", "red"]`
464
+
465
+ # !array_intersect_assoc:intersect_assoc
466
+
467
+ Return the entries from the first array that are also present in the second array. Values and keys are used for matching.
468
+
469
+ ```xs
470
+ [{"a": "green"},{"b": "brown"},{"c":"blue"},"red"]|array_intersect_assoc:[{"a":"green"},{"b":"yellow"},"blue","red"]
471
+ ```
472
+
473
+ Result: `[{a: "green",b: "brown", "red"]`
474
+
475
+ # merge
476
+
477
+ Merge the first level of elements of both arrays together and return the new array
478
+
479
+ ```xs
480
+ [1,2,3]|merge:["a","b","c"]
481
+ ```
482
+
483
+ Result: `[1,2,3,"a","b","c"]`
484
+
485
+ # !array_merge:merge
486
+
487
+ Merge the first level of elements of both arrays together and return the new array
488
+
489
+ ```xs
490
+ [1,2,3]|array_merge:["a","b","c"]
491
+ ```
492
+
493
+ Result: `[1,2,3,"a","b","c"]`
494
+
495
+ # merge_recursive
496
+
497
+ Merge the elements from all levels of both arrays together and return the new array
498
+
499
+ ```xs
500
+ {color:{favorite: ["red"]}}|merge_recursive:{color: {favorite: ["green","blue"]}}
501
+ ```
502
+
503
+ Result: `{"color":{"favorite": ["red","green","blue"]}}`
504
+
505
+ # !array_merge_recursive:merge_recursive
506
+
507
+ Merge the elements from all levels of both arrays together and return the new array
508
+
509
+ ```xs
510
+ {color:{favorite: ["red"]}}|array_merge_recursive:{color: {favorite: ["green","blue"]}}
511
+ ```
512
+
513
+ Result: `{"color":{"favorite": ["red","green","blue"]}}`
514
+
515
+ # index_by
516
+
517
+ Create a new array indexed off of the value of each item's path
518
+
519
+ ```xs
520
+ [{id:1,g:"x"},{id:2,g:"y"},{id:3,g:"x"}]|index_by:g
521
+ ```
522
+
523
+ Result: `{"x": [{"id":1,"g":"x"},{"id":3,"g":"x"}], "y": [{"id":2,"g":"y"}]}`
524
+
525
+ # push
526
+
527
+ Push an element on to the end of an array and return the new array
528
+
529
+ ```xs
530
+ [1,2,3]|push:"a"
531
+ ```
532
+
533
+ Result: `[1,2,3,"a"]`
534
+
535
+ # !array_push:push
536
+
537
+ Push an element on to the end of an array and return the new array
538
+
539
+ ```xs
540
+ [1,2,3]|array_push:"a"
541
+ ```
542
+
543
+ Result: `[1,2,3,"a"]`
544
+
545
+ # pop
546
+
547
+ Pops the last element of the array off and returns it
548
+
549
+ ```xs
550
+ [1,2,3]|pop
551
+ ```
552
+
553
+ Result: `3`
554
+
555
+ # !array_pop:pop
556
+
557
+ Pops the last element of the array off and returns it
558
+
559
+ ```xs
560
+ [1,2,3]|array_pop
561
+ ```
562
+
563
+ Result: `3`
564
+
565
+ # unshift
566
+
567
+ Push an element to the beginning of an array and return the new array
568
+
569
+ ```xs
570
+ [1,2,3]|unshift:0
571
+ ```
572
+
573
+ Result: `[0,1,2,3]`
574
+
575
+ # !array_unshift:unshift
576
+
577
+ Push an element to the beginning of an array and return the new array
578
+
579
+ ```xs
580
+ [1,2,3]|array_unshift:0
581
+ ```
582
+
583
+ Result: `[0,1,2,3]`
584
+
585
+ # shift
586
+
587
+ Shifts the first element of the array off and returns it
588
+
589
+ ```xs
590
+ [1,2,3]|shift
591
+ ```
592
+
593
+ Result: `1`
594
+
595
+ # !array_shift:shift
596
+
597
+ Shifts the first element of the array off and returns it
598
+
599
+ ```xs
600
+ [1,2,3]|array_shift
601
+ ```
602
+
603
+ Result: `1`
604
+
605
+ # remove
606
+
607
+ Remove any elements from the array that match the supplied value and then return the new array
608
+
609
+ ```xs
610
+ [{v:1},{v:2},{v:3}]|remove:{v:2}
611
+ ```
612
+
613
+ Result: `[{v:1},{v:3}]`
614
+
615
+ # !array_remove:remove
616
+
617
+ Remove any elements from the array that match the supplied value and then return the new array
618
+
619
+ ```xs
620
+ [{v:1},{v:2},{v:3}]|array_remove:{v:2}
621
+ ```
622
+
623
+ Result: `[{v:1},{v:3}]`
624
+
625
+ # append
626
+
627
+ Push an element on to the end of an array within an object and return the updated object
628
+
629
+ ```xs
630
+ [1,2,3]|append:4
631
+ ```
632
+
633
+ Result: `[1,2,3,4]`
634
+
635
+ # prepend
636
+
637
+ Push an element on to the beginning of an array within an object and return the updated object
638
+
639
+ ```xs
640
+ [1,2,3]|prepend:0
641
+ ```
642
+
643
+ Result: `[0,1,2,3]`
644
+
645
+ # abs
646
+
647
+ Returns the absolute value
648
+
649
+ ```xs
650
+ -10|abs
651
+ ```
652
+
653
+ Result: `10`
654
+
655
+ # sqrt
656
+
657
+ Returns the square root of the value
658
+
659
+ ```xs
660
+ 9|sqrt
661
+ ```
662
+
663
+ Result: `3`
664
+
665
+ # exp
666
+
667
+ Returns the exponent of mathematical expression "e"
668
+
669
+ ```xs
670
+ 0|exp
671
+ ```
672
+
673
+ Result: `1`
674
+
675
+ # log
676
+
677
+ Returns the logarithm with a custom base
678
+
679
+ ```xs
680
+ 2|log:2
681
+ ```
682
+
683
+ Result: `1`
684
+
685
+ # log10
686
+
687
+ Returns the Base-10 logarithm
688
+
689
+ ```xs
690
+ 100|log10
691
+ ```
692
+
693
+ Result: `2`
694
+
695
+ # ln
696
+
697
+ Returns the natural logarithm
698
+
699
+ ```xs
700
+ 10|ln
701
+ ```
702
+
703
+ Result: `2.30258...`
704
+
705
+ # pow
706
+
707
+ Returns the value raised to the power of exp.
708
+
709
+ ```xs
710
+ 10|pow:2
711
+ ```
712
+
713
+ Result: `100`
714
+
715
+ # array_min
716
+
717
+ Returns the min of the values of the array
718
+
719
+ ```xs
720
+ [1,2,3]|array_min
721
+ ```
722
+
723
+ Result: `1`
724
+
725
+ # array_max
726
+
727
+ Returns the max of the values of the array
728
+
729
+ ```xs
730
+ [1,2,3]|array_max
731
+ ```
732
+
733
+ Result: `3`
734
+
735
+ # !num_min:min
736
+
737
+ Returns the min both values
738
+
739
+ ```xs
740
+ 1|num_min:0
741
+ ```
742
+
743
+ Result: `0`
744
+
745
+ # !num_max:max
746
+
747
+ Returns the max both values
748
+
749
+ ```xs
750
+ 5|num_max:20
751
+ ```
752
+
753
+ Result: `20`
754
+
755
+ # sum
756
+
757
+ Returns the sum of the values of the array
758
+
759
+ ```xs
760
+ [1,2,3,4]|sum
761
+ ```
762
+
763
+ Result: `10`
764
+
765
+ # avg
766
+
767
+ Returns the average of the values of the array
768
+
769
+ ```xs
770
+ [1,2,3,4]|avg
771
+ ```
772
+
773
+ Result: `2.5`
774
+
775
+ # product
776
+
777
+ Returns the product of the values of the array
778
+
779
+ ```xs
780
+ [1,2,3,4]|product
781
+ ```
782
+
783
+ Result: `24`
784
+
785
+ # !eq:equals
786
+
787
+ Returns a boolean if both values are equal
788
+
789
+ ```xs
790
+ 4|equals:4
791
+ ```
792
+
793
+ Result: `true`
794
+
795
+ # eq
796
+
797
+ Returns a boolean if both values are equal
798
+
799
+ ```xs
800
+ 4|eq:4
801
+ ```
802
+
803
+ Result: `true`
804
+
805
+ # not_equals
806
+
807
+ Returns a boolean if both values are not equal
808
+
809
+ ```xs
810
+ 4|not_equals:4
811
+ ```
812
+
813
+ Result: `false`
814
+
815
+ # !ne:not_equals
816
+
817
+ Returns a boolean if both values are not equal
818
+
819
+ ```xs
820
+ 4|ne:4
821
+ ```
822
+
823
+ Result: `false`
824
+
825
+ # greater_than
826
+
827
+ Returns a boolean if the left value is greater than the right value
828
+
829
+ ```xs
830
+ 4|greater_than:2
831
+ ```
832
+
833
+ Result: `true`
834
+
835
+ # !gt:greater_than
836
+
837
+ Returns a boolean if the left value is greater than the right value
838
+
839
+ ```xs
840
+ 4|gt:2
841
+ ```
842
+
843
+ Result: `true`
844
+
845
+ # greater_than_or_equal
846
+
847
+ Returns a boolean if the left value is greater than or equal to the right value
848
+
849
+ ```xs
850
+ 4|greater_than_or_equal:2
851
+ ```
852
+
853
+ Result: `true`
854
+
855
+ # !gte:greater_than_or_equal
856
+
857
+ Returns a boolean if the left value is greater than or equal to the right value
858
+
859
+ ```xs
860
+ 4|gte:2
861
+ ```
862
+
863
+ Result: `true`
864
+
865
+ # less_than
866
+
867
+ Returns a boolean if the left value is less than the right value
868
+
869
+ ```xs
870
+ 4|less_than:2
871
+ ```
872
+
873
+ Result: `false`
874
+
875
+ # !lt:less_than
876
+
877
+ Returns a boolean if the left value is less than the right value
878
+
879
+ ```xs
880
+ 4|lt:2
881
+ ```
882
+
883
+ Result: `false`
884
+
885
+ # less_than_or_equal
886
+
887
+ Returns a boolean if the left value is less than or equal to the right value
888
+
889
+ ```xs
890
+ 4|less_than_or_equal:2
891
+ ```
892
+
893
+ Result: `false`
894
+
895
+ # !lte:less_than_or_equal
896
+
897
+ Returns a boolean if the left value is less than or equal to the right value
898
+
899
+ ```xs
900
+ 4|lte:2
901
+ ```
902
+
903
+ Result: `false`
904
+
905
+ # odd
906
+
907
+ Returns whether or not the value is odd
908
+
909
+ ```xs
910
+ 4|odd
911
+ ```
912
+
913
+ Result: `false`
914
+
915
+ # even
916
+
917
+ Returns whether or not the value is even
918
+
919
+ ```xs
920
+ 4|even
921
+ ```
922
+
923
+ Result: `true`
924
+
925
+ # in
926
+
927
+ Returns whether or not the value is in the array
928
+
929
+ ```xs
930
+ [1,2,3]|in:3
931
+ ```
932
+
933
+ Result: `true`
934
+
935
+ # add
936
+
937
+ Add 2 values together and return the answer
938
+
939
+ ```xs
940
+ 2|add:3
941
+ ```
942
+
943
+ Result: `5`
944
+
945
+ # subtract
946
+
947
+ Subtract 2 values together and return the answer
948
+
949
+ ```xs
950
+ 2|subtract:3
951
+ ```
952
+
953
+ Result: `-1`
954
+
955
+ # !sub:subtract
956
+
957
+ Subtract 2 values together and return the answer
958
+
959
+ ```xs
960
+ 2|sub:3
961
+ ```
962
+
963
+ Result: `-1`
964
+
965
+ # multiply
966
+
967
+ Multiply 2 values together and return the answer
968
+
969
+ ```xs
970
+ 2|multiply:3
971
+ ```
972
+
973
+ Result: `6`
974
+
975
+ # !mul:multiply
976
+
977
+ Multiply 2 values together and return the answer
978
+
979
+ ```xs
980
+ 2|mul:3
981
+ ```
982
+
983
+ Result: `6`
984
+
985
+ # modulus
986
+
987
+ Modulus 2 values together and return the answer
988
+
989
+ ```xs
990
+ 20|modulus:3
991
+ ```
992
+
993
+ Result: `2`
994
+
995
+ # !mod:modulus
996
+
997
+ Modulus 2 values together and return the answer
998
+
999
+ ```xs
1000
+ 20|mod:3
1001
+ ```
1002
+
1003
+ Result: `2`
1004
+
1005
+ # divide
1006
+
1007
+ Divide 2 values together and return the answer
1008
+
1009
+ ```xs
1010
+ 20|divide:4
1011
+ ```
1012
+
1013
+ Result: `5`
1014
+
1015
+ # !div:divide
1016
+
1017
+ Divide 2 values together and return the answer
1018
+
1019
+ ```xs
1020
+ 20|div:4
1021
+ ```
1022
+
1023
+ Result: `5`
1024
+
1025
+ # bitwise_and
1026
+
1027
+ Bitwise AND 2 values together and return the answer
1028
+
1029
+ ```xs
1030
+ 7|bitwise_and:3
1031
+ ```
1032
+
1033
+ Result: `3`
1034
+
1035
+ # bitwise_or
1036
+
1037
+ Bitwise OR 2 values together and return the answer
1038
+
1039
+ ```xs
1040
+ 7|bitwise_or:9
1041
+ ```
1042
+
1043
+ Result: `15`
1044
+
1045
+ # bitwise_xor
1046
+
1047
+ Bitwise XOR 2 values together and return the answer
1048
+
1049
+ ```xs
1050
+ 7|bitwise_xor:9
1051
+ ```
1052
+
1053
+ Result: `14`
1054
+
1055
+ # not
1056
+
1057
+ Returns the opposite of the existing value evaluated as a boolean
1058
+
1059
+ ```xs
1060
+ true|not
1061
+ ```
1062
+
1063
+ Result: `false`
1064
+
1065
+ # bitwise_not
1066
+
1067
+ Returns the existing value with its bits flipped
1068
+
1069
+ ```xs
1070
+ 8|bitwise_not
1071
+ ```
1072
+
1073
+ Result: `-9`
1074
+
1075
+ # is_null
1076
+
1077
+ Returns whether or not the value is null
1078
+
1079
+ ```xs
1080
+ 8|is_null
1081
+ ```
1082
+
1083
+ Result: `false`
1084
+
1085
+ # !null:is_null
1086
+
1087
+ Returns whether or not the value is null
1088
+
1089
+ ```xs
1090
+ 8|null
1091
+ ```
1092
+
1093
+ Result: `false`
1094
+
1095
+ # is_empty
1096
+
1097
+ Returns whether or not the value is empty ("", null, 0, "0", false, [], {})
1098
+
1099
+ ```xs
1100
+ []|is_empty
1101
+ ```
1102
+
1103
+ Result: `true`
1104
+
1105
+ # !empty:is_empty
1106
+
1107
+ Returns whether or not the value is empty ("", null, 0, "0", false, [], {})
1108
+
1109
+ ```xs
1110
+ []|empty
1111
+ ```
1112
+
1113
+ Result: `true`
1114
+
1115
+ # is_object
1116
+
1117
+ Returns whether or not the value is an object.
1118
+
1119
+ ```xs
1120
+ {id:2, value:3, size:4}|is_object
1121
+ ```
1122
+
1123
+ Result: `true`
1124
+
1125
+ # is_array
1126
+
1127
+ Returns whether or not the value is a numerical indexed array.
1128
+
1129
+ ```xs
1130
+ [1,2,3]|is_array
1131
+ ```
1132
+
1133
+ Result: `true`
1134
+
1135
+ # is_int
1136
+
1137
+ Returns whether or not the value is an integer.
1138
+
1139
+ ```xs
1140
+ 123|is_int
1141
+ ```
1142
+
1143
+ Result: `true`
1144
+
1145
+ # is_decimal
1146
+
1147
+ Returns whether or not the value is a decimal value.
1148
+
1149
+ ```xs
1150
+ 123.45|is_decimal
1151
+ ```
1152
+
1153
+ Result: `true`
1154
+
1155
+ # is_bool
1156
+
1157
+ Returns whether or not the value is a boolean.
1158
+
1159
+ ```xs
1160
+ false|is_bool
1161
+ ```
1162
+
1163
+ Result: `true`
1164
+
1165
+ # is_text
1166
+
1167
+ Returns whether or not the value is text.
1168
+
1169
+ ```xs
1170
+ "213"|is_text
1171
+ ```
1172
+
1173
+ Result: `true`
1174
+
1175
+ # addslashes
1176
+
1177
+ Adds a backslash to the following characters: single quote, double quote, backslash, and null character.
1178
+
1179
+ ```xs
1180
+ 'he said "Hi!"'|addslashes
1181
+ ```
1182
+
1183
+ Result: `"he said \\"Hi!\\""`
1184
+
1185
+ # escape
1186
+
1187
+ Converts special characters into their escaped variants. Ex: for tabs and
1188
+ for newlines.
1189
+
1190
+ ````xs
1191
+ 'he sai
1192
+ ``d
1193
+
1194
+ - "Hi!"'|escape`
1195
+
1196
+ Result: `"he said \\n-\\\"Hi!\\\""`
1197
+
1198
+ # list_encodings
1199
+
1200
+ List support character encodings
1201
+
1202
+ ```xs
1203
+ |list_encodings
1204
+ ````
1205
+
1206
+ Result: `["UTF-8", "ISO-8859-1", ...]`
1207
+
1208
+ # detect_encoding
1209
+
1210
+ Detect the character encoding of the supplied text
1211
+
1212
+ ```xs
1213
+ "étude"|detect_encoding
1214
+ ```
1215
+
1216
+ Result: `UTF-8`
1217
+
1218
+ # text_unescape
1219
+
1220
+ Convert escaped sequences into their raw form. Ex: \n becomes a newline, \t becomes a tab.
1221
+
1222
+ ```xs
1223
+ 'he said \\n-\\\"Hi!\\\"'|text_unescape
1224
+ ```
1225
+
1226
+ Result: `"he said \n-\"Hi!\""`
1227
+
1228
+ # text_escape
1229
+
1230
+ Converts control characters into their escaped sequences. Ex: newlines as \n, tabs as \t
1231
+
1232
+ ```xs
1233
+ 'he said \n-\\"Hi!\\"'|text_escape
1234
+ ```
1235
+
1236
+ Result: `"he said \\n-\\\"Hi!\\\""`
1237
+
1238
+ # sql_esc
1239
+
1240
+ Wraps text in single quotes and escapes any single quotes within the text to prevent SQL injection attacks. This is useful for safely inserting user input into values within SQL queries.
1241
+
1242
+ # sql_alias
1243
+
1244
+ Wraps text in double quotes and escapes any double quotes within the text to prevent SQL injection attacks. This is useful for safely inserting user input into table names or aliases within SQL queries.
1245
+
1246
+ # is_uuid
1247
+
1248
+ Returns whether or not the value is a valid UUID.
1249
+
1250
+ ```xs
1251
+ "550e8400-e29b-41d4-a716-446655440000"|is_uuid
1252
+ ```
1253
+
1254
+ Result: `true`
1255
+
1256
+ # to_utf8
1257
+
1258
+ Convert the supplied text from its binary form (ISO-8859-1) to UTF-8.
1259
+
1260
+ ```xs
1261
+ "�tudes"|to_utf8
1262
+ ```
1263
+
1264
+ Result: `"études"`
1265
+
1266
+ # from_utf8
1267
+
1268
+ Convert the supplied text from UTF-8 to its binary form (ISO-8859-1).
1269
+
1270
+ ```xs
1271
+ "études"|from_utf8
1272
+ ```
1273
+
1274
+ Result: `"�tudes"`
1275
+
1276
+ # convert_encoding
1277
+
1278
+ Convert the character encoding of the supplied text
1279
+
1280
+ ```xs
1281
+ "études"|convert_encoding:"ISO-8859-1":"UTF-8"
1282
+ ```
1283
+
1284
+ Result: `"�tudes"`
1285
+
1286
+ # to_lower
1287
+
1288
+ Converts all characters to lower case and returns the result
1289
+
1290
+ ```xs
1291
+ "Epic Battle"|to_lower
1292
+ ```
1293
+
1294
+ Result: `"epic battle"`
1295
+
1296
+ # !lower:to_lower
1297
+
1298
+ Converts all characters to lower case and returns the result
1299
+
1300
+ ```xs
1301
+ "Epic Battle"|lower
1302
+ ```
1303
+
1304
+ Result: `"epic battle"`
1305
+
1306
+ # to_upper
1307
+
1308
+ Converts all characters to upper case and returns the result
1309
+
1310
+ ```xs
1311
+ "Epic Battle"|to_upper
1312
+ ```
1313
+
1314
+ Result: `"EPIC BATTLE"`
1315
+
1316
+ # !upper:to_upper
1317
+
1318
+ Converts all characters to upper case and returns the result
1319
+
1320
+ ```xs
1321
+ "Epic Battle"|upper
1322
+ ```
1323
+
1324
+ Result: `"EPIC BATTLE"`
1325
+
1326
+ # trim
1327
+
1328
+ Trim whitespace or other characters from both sides and return the result
1329
+
1330
+ ```xs
1331
+ " Epic Battle "|trim
1332
+ ```
1333
+
1334
+ Result: `"Epic Battle"`
1335
+
1336
+ # ltrim
1337
+
1338
+ Trim whitespace or other characters from the left side and return the result
1339
+
1340
+ ```xs
1341
+ " Epic Battle "|ltrim
1342
+ ```
1343
+
1344
+ Result: `"Epic Battle "`
1345
+
1346
+ # rtrim
1347
+
1348
+ Trim whitespace or other characters from the right return the result
1349
+
1350
+ ```xs
1351
+ " Epic Battle "|rtrim
1352
+ ```
1353
+
1354
+ Result: `" Epic Battle"`
1355
+
1356
+ # capitalize
1357
+
1358
+ Converts the first letter of each word to a capital letter
1359
+
1360
+ ```xs
1361
+ "epic battle"|capitalize
1362
+ ```
1363
+
1364
+ Result: `"Epic Battle"`
1365
+
1366
+ # substr
1367
+
1368
+ Extracts a section of text
1369
+
1370
+ ```xs
1371
+ "Epic Battle"|substr:5:6
1372
+ ```
1373
+
1374
+ Result: `"Battle"`
1375
+
1376
+ # split
1377
+
1378
+ Splits text into an array of text and returns the result
1379
+
1380
+ ```xs
1381
+ "Epic Battle"|split:" "
1382
+ ```
1383
+
1384
+ Result: `["Epic","Battle"]`
1385
+
1386
+ # join
1387
+
1388
+ Joins an array into a text string via the separator and returns the result
1389
+
1390
+ ```xs
1391
+ ["Epic","Battle"]|join:" "
1392
+ ```
1393
+
1394
+ Result: `"Epic Battle"`
1395
+
1396
+ # slice
1397
+
1398
+ Extract a section from an array.
1399
+
1400
+ ```xs
1401
+ [1,2,3,4,5]|slice:2:2
1402
+ ```
1403
+
1404
+ Result: `[3,4]`
1405
+
1406
+ # !array_slice:slice
1407
+
1408
+ Extract a section from an array.
1409
+
1410
+ ```xs
1411
+ [1,2,3,4,5]|array_slice:2:2
1412
+ ```
1413
+
1414
+ Result: `[3,4]`
1415
+
1416
+ # strlen
1417
+
1418
+ Returns the number of characters
1419
+
1420
+ ```xs
1421
+ "Epic Battle"|strlen
1422
+ ```
1423
+
1424
+ Result: `11`
1425
+
1426
+ # strip_html
1427
+
1428
+ Removes HTML tags from a string
1429
+
1430
+ ```xs
1431
+ "<p>Epic Battle</p>"|strip_html
1432
+ ```
1433
+
1434
+ Result: `"Epic Battle"`
1435
+
1436
+ # !strip_tags:strip_html
1437
+
1438
+ Removes HTML tags from a string
1439
+
1440
+ ```xs
1441
+ "<p>Epic Battle</p>"|strip_tags
1442
+ ```
1443
+
1444
+ Result: `"Epic Battle"`
1445
+
1446
+ # unaccent
1447
+
1448
+ Removes accents from characters
1449
+
1450
+ ```xs
1451
+ "études"|unaccent
1452
+ ```
1453
+
1454
+ Result: `"etudes"`
1455
+
1456
+ # !strip_accents:unaccent
1457
+
1458
+ Removes accents from characters
1459
+
1460
+ ```xs
1461
+ "études"|strip_accents
1462
+ ```
1463
+
1464
+ Result: `"etudes"`
1465
+
1466
+ # index
1467
+
1468
+ Returns the index of the case-sensitive expression or false if it can't be found
1469
+
1470
+ ```xs
1471
+ "Epic Battle"|index:"Battle"
1472
+ ```
1473
+
1474
+ Result: `5`
1475
+
1476
+ # !strpos:index
1477
+
1478
+ Returns the index of the case-sensitive expression or false if it can't be found
1479
+
1480
+ ```xs
1481
+ "Epic Battle"|strpos:"Battle"
1482
+ ```
1483
+
1484
+ Result: `5`
1485
+
1486
+ # iindex
1487
+
1488
+ Returns the index of the case-insensitive expression or false if it can't be found
1489
+
1490
+ ```xs
1491
+ "Epic Battle"|iindex:"battle"
1492
+ ```
1493
+
1494
+ Result: `5`
1495
+
1496
+ # !stripos:iindex
1497
+
1498
+ Returns the index of the case-insensitive expression or false if it can't be found
1499
+
1500
+ ```xs
1501
+ "Epic Battle"|stripos:"battle"
1502
+ ```
1503
+
1504
+ Result: `5`
1505
+
1506
+ # starts_with
1507
+
1508
+ Returns whether or not the expression is present at the beginning
1509
+
1510
+ ```xs
1511
+ "Epic Battle"|starts_with:"Epic"
1512
+ ```
1513
+
1514
+ Result: `true`
1515
+
1516
+ # istarts_with
1517
+
1518
+ Returns whether or not the case-insensitive expression is present at the beginning
1519
+
1520
+ ```xs
1521
+ "Epic Battle"|istarts_with:"epic"
1522
+ ```
1523
+
1524
+ Result: `true`
1525
+
1526
+ # ends_with
1527
+
1528
+ Returns whether or not the expression is present at the end
1529
+
1530
+ ```xs
1531
+ "Epic Battle"|ends_with:"Battle"
1532
+ ```
1533
+
1534
+ Result: `true`
1535
+
1536
+ # iends_with
1537
+
1538
+ Returns whether or not the case-insensitive expression is present at the end
1539
+
1540
+ ```xs
1541
+ "Epic Battle"|iends_with:"battle"
1542
+ ```
1543
+
1544
+ Result: `true`
1545
+
1546
+ # contains
1547
+
1548
+ Returns whether or not the expression is found
1549
+
1550
+ ```xs
1551
+ "Epic Battle"|contains:"Battle"
1552
+ ```
1553
+
1554
+ Result: `true`
1555
+
1556
+ # icontains
1557
+
1558
+ Returns whether or not the case-insensitive expression is found
1559
+
1560
+ ```xs
1561
+ "Epic Battle"|icontains:"battle"
1562
+ ```
1563
+
1564
+ Result: `true`
1565
+
1566
+ # set
1567
+
1568
+ Sets a value at the path within the object and returns the updated object
1569
+
1570
+ ```xs
1571
+ {"fizz":"buzz"}|set:"foo":"bar"
1572
+ ```
1573
+
1574
+ Result: `{"fizz": "buzz","foo":"bar"}`
1575
+
1576
+ # set_conditional
1577
+
1578
+ Sets a value at the path within the object and returns the updated object, if the conditional expression is true
1579
+
1580
+ ```xs
1581
+ {'fizz':'buzz'}|set_conditional:'foo':'bar':2==1+1
1582
+ ```
1583
+
1584
+ Result: `{'fizz':'buzz','foo':'bar'}`
1585
+
1586
+ # set_ifnotempty
1587
+
1588
+ Sets a value (if it is not empty: "", null, 0, "0", false, [], {}) at the path within the object and returns the updated object
1589
+
1590
+ ```xs
1591
+ {'fizz':'buzz'}|set_ifnotempty:'foo':'bar'
1592
+ ```
1593
+
1594
+ Result: `{'fizz':'buzz','foo':'bar'}`
1595
+
1596
+ # set_ifnotnull
1597
+
1598
+ Sets a value (if it is not null) at the path within the object and returns the updated object
1599
+
1600
+ ```xs
1601
+ {'fizz':'buzz'}|set_ifnotnull:'foo':'bar'
1602
+ ```
1603
+
1604
+ Result: `{'fizz':'buzz','foo':'bar'}`
1605
+
1606
+ # first_notnull
1607
+
1608
+ Returns the first value that is not null
1609
+
1610
+ ```xs
1611
+ null|first_notnull:0
1612
+ ```
1613
+
1614
+ Result: `0`
1615
+
1616
+ # first_notempty
1617
+
1618
+ Returns the first value that is not empty - i.e. not ("", null, 0, "0", false, [], {})
1619
+
1620
+ ```xs
1621
+ ""|first_notempty:1
1622
+ ```
1623
+
1624
+ Result: `1`
1625
+
1626
+ # unset
1627
+
1628
+ Removes a value at the path within the object and returns the updated object
1629
+
1630
+ ```xs
1631
+ {'fizz':'buzz','foo':'bar'}|unset:'foo'
1632
+ ```
1633
+
1634
+ Result: `{'fizz':'buzz'}`
1635
+
1636
+ # transform
1637
+
1638
+ Processes an expression with local data bound to the $this variable
1639
+
1640
+ ```xs
1641
+ 2|transform:$$+3"
1642
+ ```
1643
+
1644
+ Result: `5`
1645
+
1646
+ # get
1647
+
1648
+ Returns the value of an object at the specified path
1649
+
1650
+ ```xs
1651
+ {'fizz':'buzz'}|get:'fizz'
1652
+ ```
1653
+
1654
+ Result: `"buzz"`
1655
+
1656
+ # has
1657
+
1658
+ Returns the existence of whether or not something is present in the object at the specified path
1659
+
1660
+ ```xs
1661
+ {'fizz':'buzz'}|has:'fizz'
1662
+ ```
1663
+
1664
+ Result: `true`
1665
+
1666
+ # fill
1667
+
1668
+ Create an array of a certain size with a default value.
1669
+
1670
+ ```xs
1671
+ "v"|fill:0:6
1672
+ ```
1673
+
1674
+ Result: `["v","v","v","v","v","v"]`
1675
+
1676
+ # !array_fill:fill
1677
+
1678
+ Create an array of a certain size with a default value.
1679
+
1680
+ ```xs
1681
+ "v"|array_fill:0:6
1682
+ ```
1683
+
1684
+ Result: `["v","v","v","v","v","v"]`
1685
+
1686
+ # fill_keys
1687
+
1688
+ Create an array of keys with a default value.
1689
+
1690
+ ```xs
1691
+ key|fill_keys:["a","b","c"]
1692
+ ```
1693
+
1694
+ Result: `{"a":"key","b":"key","c":"key"}`
1695
+
1696
+ # !array_fill_keys:fill_keys
1697
+
1698
+ Create an array of keys with a default value.
1699
+
1700
+ ```xs
1701
+ key|array_fill_keys:["a","b","c"]
1702
+ ```
1703
+
1704
+ Result: `{"a":"key","b":"key","c":"key"}`
1705
+
1706
+ # keys
1707
+
1708
+ Get the property keys of an object/array as a numerically indexed array.
1709
+
1710
+ ```xs
1711
+ {"a":1,"b":2,"c":3}|keys
1712
+ ```
1713
+
1714
+ Result: `["a","b","c"]`
1715
+
1716
+ # !array_keys:keys
1717
+
1718
+ Get the property keys of an object/array as a numerically indexed array.
1719
+
1720
+ ```xs
1721
+ {"a":1,"b":2,"c":3}|array_keys
1722
+ ```
1723
+
1724
+ Result: `["a","b","c"]`
1725
+
1726
+ # values
1727
+
1728
+ Get the property values of an object/array as a numerically indexed array
1729
+
1730
+ ```xs
1731
+ {"a":1,"b":2,"c":3}|values
1732
+ ```
1733
+
1734
+ Result: `[1,2,3]`
1735
+
1736
+ # !array_values:values
1737
+
1738
+ Get the property values of an object/array as a numerically indexed array
1739
+
1740
+ ```xs
1741
+ {"a":1,"b":2,"c":3}|array_values
1742
+ ```
1743
+
1744
+ Result: `[1,2,3]`
1745
+
1746
+ # entries
1747
+
1748
+ Get the property entries of an object/array as a numerically indexed array of key/value pairs.
1749
+
1750
+ ```xs
1751
+ {"a":1,"b":2,"c":3}|entries
1752
+ ```
1753
+
1754
+ Result: `[{key:"a",value:1},{key:"b",value:2},{key:"c",value:3}]`
1755
+
1756
+ # !array_entries:entries
1757
+
1758
+ Get the property entries of an object/array as a numerically indexed array of key/value pairs.
1759
+
1760
+ ```xs
1761
+ {"a":1,"b":2,"c":3}|array_entries
1762
+ ```
1763
+
1764
+ Result: `[{key:"a",value:1},{key:"b",value:2},{key:"c",value:3}]`
1765
+
1766
+ # to_expr
1767
+
1768
+ Converts text into an expression, processes it, and returns the result
1769
+
1770
+ ```xs
1771
+ "(2 + 1) % 2"|to_expr
1772
+ ```
1773
+
1774
+ Result: `1`
1775
+
1776
+ # to_text
1777
+
1778
+ Converts integer, decimal, or bool types to text and returns the result
1779
+
1780
+ ```xs
1781
+ 1.344|to_text
1782
+ ```
1783
+
1784
+ Result: `"1.344"`
1785
+
1786
+ # to_int
1787
+
1788
+ Converts text, decimal, or bool types to an integer and returns the result
1789
+
1790
+ ```xs
1791
+ "133.45 kg"|to_int
1792
+ ```
1793
+
1794
+ Result: `133`
1795
+
1796
+ # to_decimal
1797
+
1798
+ Converts text, integer, or bool types to a decimal and returns the result
1799
+
1800
+ ```xs
1801
+ "133.45 kg"|to_decimal
1802
+ ```
1803
+
1804
+ Result: `133.45`
1805
+
1806
+ # to_bool
1807
+
1808
+ Converts text, integer, or decimal types to a bool and returns the result
1809
+
1810
+ ```xs
1811
+ "true"|to_bool
1812
+ ```
1813
+
1814
+ Result: `true`
1815
+
1816
+ # to_timestamp
1817
+
1818
+ Converts a text expression (now, next friday, Jan 1 2000) to timestamp compatible format.
1819
+
1820
+ ```xs
1821
+ "next friday"|to_timestamp:"America/Los_Angeles"
1822
+ ```
1823
+
1824
+ Result: `1758265200000`
1825
+
1826
+ # !to_epochms:to_timestamp
1827
+
1828
+ Converts a text expression (now, next friday, Jan 1 2000) to timestamp compatible format.
1829
+
1830
+ ```xs
1831
+ "next friday"|to_epochms:"America/Los_Angeles"
1832
+ ```
1833
+
1834
+ Result: `1758265200000`
1835
+
1836
+ # to_ms
1837
+
1838
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of milliseconds since the unix epoch.
1839
+
1840
+ ```xs
1841
+ "next friday"|to_ms:"America/Los_Angeles"
1842
+ ```
1843
+
1844
+ Result: `1758265200000`
1845
+
1846
+ # !to_epoch_ms:to_ms
1847
+
1848
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of milliseconds since the unix epoch.
1849
+
1850
+ ```xs
1851
+ "next friday"|to_epoch_ms:"America/Los_Angeles"
1852
+ ```
1853
+
1854
+ Result: `1758265200000`
1855
+
1856
+ # to_seconds
1857
+
1858
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of seconds since the unix epoch.
1859
+
1860
+ ```xs
1861
+ "next friday"|to_seconds:"America/Los_Angeles"
1862
+ ```
1863
+
1864
+ Result: `1758265200`
1865
+
1866
+ # !to_epoch_sec:to_seconds
1867
+
1868
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of seconds since the unix epoch.
1869
+
1870
+ ```xs
1871
+ "next friday"|to_epoch_sec:"America/Los_Angeles"
1872
+ ```
1873
+
1874
+ Result: `1758265200`
1875
+
1876
+ # to_minutes
1877
+
1878
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of minutes since the unix epoch.
1879
+
1880
+ ```xs
1881
+ "next friday"|to_minutes:"America/Los_Angeles"
1882
+ ```
1883
+
1884
+ Result: `29304420`
1885
+
1886
+ # !to_epoch_minute:to_minutes
1887
+
1888
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of minutes since the unix epoch.
1889
+
1890
+ ```xs
1891
+ "next friday"|to_epoch_minute:"America/Los_Angeles"
1892
+ ```
1893
+
1894
+ Result: `29304420`
1895
+
1896
+ # to_hours
1897
+
1898
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of hours since the unix epoch.
1899
+
1900
+ ```xs
1901
+ "next friday"|to_hours:"America/Los_Angeles"
1902
+ ```
1903
+
1904
+ Result: `488407`
1905
+
1906
+ # !to_epoch_hour:to_hours
1907
+
1908
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of hours since the unix epoch.
1909
+
1910
+ ```xs
1911
+ "next friday"|to_epoch_hour:"America/Los_Angeles"
1912
+ ```
1913
+
1914
+ Result: `488407`
1915
+
1916
+ # to_days
1917
+
1918
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of days since the unix epoch.
1919
+
1920
+ ```xs
1921
+ "next friday"|to_days:"America/Los_Angeles"
1922
+ ```
1923
+
1924
+ Result: `20350`
1925
+
1926
+ # !to_epoch_day:to_days
1927
+
1928
+ Converts a text expression (now, next friday, Jan 1 2000) to the number of days since the unix epoch.
1929
+
1930
+ ```xs
1931
+ "next friday"|to_epoch_day:"America/Los_Angeles"
1932
+ ```
1933
+
1934
+ Result: `20350`
1935
+
1936
+ # create_object
1937
+
1938
+ Creates an object based on a list of keys and a list of values
1939
+
1940
+ ```xs
1941
+ ["a","b","c"]|create_object:[1,2,3]
1942
+ ```
1943
+
1944
+ Result: `{"a":1,"b":2,"c":3}`
1945
+
1946
+ # create_object_from_entries
1947
+
1948
+ Creates an object based on an array of key/value pairs. (i.e. same result as the entries filter)
1949
+
1950
+ ```xs
1951
+ [{key:"a",value:1},{key:"b",value:2},{key:"c",value:3}]|create_object_from_entries
1952
+ ```
1953
+
1954
+ Result: `{"a":1,"b":2,"c":3}`
1955
+
1956
+ # json_decode
1957
+
1958
+ Decodes the value represented as json and returns the result
1959
+
1960
+ ```xs
1961
+ "{\"a\":1,\"b\":2,\"c\":3}"|json_decode
1962
+ ```
1963
+
1964
+ Result: `{"a":1,"b":2,"c":3}`
1965
+
1966
+ # json_encode
1967
+
1968
+ Encodes the value and returns the result as json text
1969
+
1970
+ ```xs
1971
+ {"a":1,"b":2,"c":3}|json_encode
1972
+ ```
1973
+
1974
+ Result: `"{\"a\":1,\"b\":2,\"c\":3}"`
1975
+
1976
+ # xml_decode
1977
+
1978
+ Decodes XML and returns the result
1979
+
1980
+ ```xs
1981
+ "<root><a>1</a><b>2</b><c>3</c></root>"|xml_decode
1982
+ ```
1983
+
1984
+ Result:
1985
+
1986
+ ```json
1987
+ {
1988
+ "root": {
1989
+ "@attributes": [],
1990
+ "value": [
1991
+ {
1992
+ "a": {
1993
+ "@attributes": [],
1994
+ "value": "1"
1995
+ }
1996
+ },
1997
+ {
1998
+ "b": {
1999
+ "@attributes": [],
2000
+ "value": "2"
2001
+ }
2002
+ }
2003
+ ]
2004
+ }
2005
+ }
2006
+ ```
2007
+
2008
+ # csv_parse
2009
+
2010
+ Parse the contents of a CSV file and convert it into an array of objects.
2011
+
2012
+ # csv_decode
2013
+
2014
+ Decodes the value represented in the CSV format and returns the result
2015
+
2016
+ # csv_encode
2017
+
2018
+ Encodes the value and returns the result in CSV format
2019
+
2020
+ # csv_create
2021
+
2022
+ Creates a CSV format data stream from a list of column names and their corresponding data rows.
2023
+
2024
+ # url_decode
2025
+
2026
+ Decodes the value represented as a url encoded value
2027
+
2028
+ ```xs
2029
+ "Hello%2C%20World%21"|url_decode
2030
+ ```
2031
+
2032
+ Result: `"Hello, World!"`
2033
+
2034
+ # url_decode_rfc3986
2035
+
2036
+ Decodes the value represented as a url encoded value using the RFC 3986 specification
2037
+
2038
+ ```xs
2039
+ "Hello%2C%20World%21"|url_decode_rfc3986
2040
+ ```
2041
+
2042
+ Result: `"Hello, World!"`
2043
+
2044
+ # url_encode
2045
+
2046
+ Encodes the value and returns the result as a url encoded value
2047
+
2048
+ ```xs
2049
+ "Hello, World!"|url_encode
2050
+ ```
2051
+
2052
+ Result: `"Hello%2C%20World%21"`
2053
+
2054
+ # url_encode_rfc3986
2055
+
2056
+ Encodes the value and returns the result as a url encoded value using the RFC 3986 specification
2057
+
2058
+ ```xs
2059
+ "Hello, World!"|url_encode_rfc3986
2060
+ ```
2061
+
2062
+ Result: `"Hello%2C%20World%21"`
2063
+
2064
+ # url_addarg
2065
+
2066
+ Parses a URL and returns an updated version with an encoded version of the supplied argument
2067
+
2068
+ ```xs
2069
+ "https://example.com?foo=bar"|url_addarg:"fiz":"buz"
2070
+ ```
2071
+
2072
+ Result: `"https://example.com?foo=bar&fiz=buz"`
2073
+
2074
+ # url_delarg
2075
+
2076
+ Parses a URL and returns an updated version with the supplied argument removed
2077
+
2078
+ ```xs
2079
+ "https://example.com?foo=bar&fiz=buz"|url_delarg:"fiz"
2080
+ ```
2081
+
2082
+ Result: `"https://example.com?foo=bar"`
2083
+
2084
+ # url_hasarg
2085
+
2086
+ Returns the existence of a argument in the URL
2087
+
2088
+ ```xs
2089
+ "https://example.com?foo=bar&fiz=buz"|url_hasarg:"fiz"
2090
+ ```
2091
+
2092
+ Result: `true`
2093
+
2094
+ # url_getarg
2095
+
2096
+ Gets the argument's value from a URL
2097
+
2098
+ ```xs
2099
+ "https://example.com?foo=bar&fiz=buz"|url_getarg:"fiz"
2100
+ ```
2101
+
2102
+ Result: `"buz"`
2103
+
2104
+ # url_parse
2105
+
2106
+ Parses a URL into its individual components.
2107
+
2108
+ ```xs
2109
+ "https://username:password@example.com:8080/path?foo=bar&fiz=buz#fragment"|url_parse
2110
+ ```
2111
+
2112
+ Result:
2113
+
2114
+ ````json
2115
+ {
2116
+ "scheme": "https",
2117
+ "host": "example.com",
2118
+ "port": 8080,
2119
+ "user": "username",
2120
+ "pass": "password",
2121
+ "path": "/path",
2122
+ "query": "foo=bar&fiz=buz",
2123
+ "fragment": "fragment"
2124
+ }```
2125
+
2126
+ # querystring_parse
2127
+
2128
+ Parses a query string from a URL into its individual key-value pairs.
2129
+
2130
+ ```xs
2131
+ "foo=bar&fiz=buz"|querystring_parse
2132
+ ````
2133
+
2134
+ Result: `{"foo": "bar", "fiz": "buz"}`
2135
+
2136
+ # yaml_decode
2137
+
2138
+ Decodes the value represented as yaml and returns the result
2139
+
2140
+ ```xs
2141
+ "a: 1\nb: 2\nc: 3"|yaml_decode
2142
+ ```
2143
+
2144
+ Result: `{"a":1,"b":2,"c":3}`
2145
+
2146
+ # yaml_encode
2147
+
2148
+ Encodes the value and returns the result as yaml text
2149
+
2150
+ ```xs
2151
+ {"a":1,"b":2,"c":3}|yaml_encode
2152
+ ```
2153
+
2154
+ Result: `"a: 1\nb: 2\nc: 3\n"`
2155
+
2156
+ # hex2bin
2157
+
2158
+ Converts a hex value into its binary equivalent
2159
+
2160
+ ```xs
2161
+ "68656c6c6f"|hex2bin
2162
+ ```
2163
+
2164
+ Result: `"hello"`
2165
+
2166
+ # bin2hex
2167
+
2168
+ Converts a binary value into its hex equivalent
2169
+
2170
+ ```xs
2171
+ "hello"|bin2hex
2172
+ ```
2173
+
2174
+ Result: `"68656c6c6f"`
2175
+
2176
+ # dechex
2177
+
2178
+ Converts a decimal value into its hex equivalent
2179
+
2180
+ ```xs
2181
+ "255"|dechex
2182
+ ```
2183
+
2184
+ Result: `"ff"`
2185
+
2186
+ # hexdec
2187
+
2188
+ Converts a hex value into its decimal equivalent
2189
+
2190
+ ```xs
2191
+ "ff"|hexdec
2192
+ ```
2193
+
2194
+ Result: `"255"`
2195
+
2196
+ # decbin
2197
+
2198
+ Converts a decimal value into its binary string (i.e. 01010) equivalent
2199
+
2200
+ ```xs
2201
+ "10"|decbin
2202
+ ```
2203
+
2204
+ Result: `"1010"`
2205
+
2206
+ # bindec
2207
+
2208
+ Converts a binary string (i.e. 01010) into its decimal equivalent
2209
+
2210
+ ```xs
2211
+ "1010"|bindec
2212
+ ```
2213
+
2214
+ Result: `"10"`
2215
+
2216
+ # decoct
2217
+
2218
+ Converts a decimal value into its octal equivalent
2219
+
2220
+ ```xs
2221
+ "10"|decoct
2222
+ ```
2223
+
2224
+ Result: `"12"`
2225
+
2226
+ # octdec
2227
+
2228
+ Converts an octal value into its decimal equivalent
2229
+
2230
+ ```xs
2231
+ "12"|octdec
2232
+ ```
2233
+
2234
+ Result: `"10"`
2235
+
2236
+ # base_convert
2237
+
2238
+ Converts a value between two bases
2239
+
2240
+ ```xs
2241
+ "ff"|base_convert:16:10
2242
+ ```
2243
+
2244
+ Result: `"255"`
2245
+
2246
+ # base64_decode
2247
+
2248
+ Decodes the value represented as base64 text and returns the result
2249
+
2250
+ ```xs
2251
+ "aGVsbG8="|base64_decode
2252
+ ```
2253
+
2254
+ Result: `"hello"`
2255
+
2256
+ # base64_encode
2257
+
2258
+ Encodes the value and returns the result as base64 text
2259
+
2260
+ ```xs
2261
+ "hello"|base64_encode
2262
+ ```
2263
+
2264
+ Result: `"aGVsbG8="`
2265
+
2266
+ # base64_decode_urlsafe
2267
+
2268
+ Decodes the value represented as base64 urlsafe text and returns the result
2269
+
2270
+ ```xs
2271
+ "aGVsbG8_"|base64_decode_urlsafe
2272
+ ```
2273
+
2274
+ Result: `"hello?"`
2275
+
2276
+ # base64_encode_urlsafe
2277
+
2278
+ Encodes the value and returns the result as base64 urlsafe text
2279
+
2280
+ ```xs
2281
+ "hello?"|base64_encode_urlsafe
2282
+ ```
2283
+
2284
+ Result: `"aGVsbG8_"`
2285
+
2286
+ # encrypt
2287
+
2288
+ Encrypts the value and returns the result in raw binary form.
2289
+
2290
+ ```xs
2291
+ "hello"|encrypt:"aes-192-cbc":"1494AX6XJUsDe51kF9S9sA==":"27222b6032574bad"
2292
+ ```
2293
+
2294
+ Result: `"���Z �r|5���~�l"`
2295
+
2296
+ # decrypt
2297
+
2298
+ Decrypts the value and returns the result.
2299
+
2300
+ ```xs
2301
+ "...encrypted..."|decrypt:"aes-192-cbc":"1494AX6XJUsDe51kF9S9sA==":"27222b6032574bad"
2302
+ ```
2303
+
2304
+ Result: `"hello"`
2305
+
2306
+ # jws_encode
2307
+
2308
+ Encodes the value and return the result as a JWS token
2309
+
2310
+ ```xs
2311
+ "hello"|jws_encode:{sub: "1234567890",name: "John Doe",admin: true,iat: 1516239022}:"a-string-secret-at-least-256-bits-long":HS256
2312
+ ```
2313
+
2314
+ Result: `"...encrypted..."`
2315
+
2316
+ # !crypto_jws_encode:jws_encode
2317
+
2318
+ Encodes the value and return the result as a JWS token
2319
+
2320
+ ```xs
2321
+ "hello"|crypto_jws_encode:{sub: "1234567890",name: "John Doe",admin: true,iat: 1516239022}:"a-string-secret-at-least-256-bits-long":HS256
2322
+ ```
2323
+
2324
+ Result: `"...encrypted..."`
2325
+
2326
+ # jws_decode
2327
+
2328
+ Decodes the JWS token and return the result
2329
+
2330
+ ```xs
2331
+ "eyJzd...ZYw"|jws_decode:{}:"a-string-secret-at-least-256-bits-long":HS256
2332
+ ```
2333
+
2334
+ Result: `"hello"`
2335
+
2336
+ # !crypto_jws_decode:jws_decode
2337
+
2338
+ Decodes the JWS token and return the result
2339
+
2340
+ ```xs
2341
+ "eyJzd...ZYw"|crypto_jws_decode:{}:"a-string-secret-at-least-256-bits-long":HS256
2342
+ ```
2343
+
2344
+ Result: `"hello"`
2345
+
2346
+ # jwe_encode
2347
+
2348
+ Encodes the value and return the result as a JWE token
2349
+
2350
+ ```xs
2351
+ "hello"|jwe_encode:{sub: "1234567890",name: "John Doe",admin: true,iat: 1516239022}:"a-string-secret-at-least-256-bits-long":"A256KW":"A256CBC-HS512"
2352
+ ```
2353
+
2354
+ Result: `"...encrypted..."`
2355
+
2356
+ # !crypto_jwe_encode:jwe_encode
2357
+
2358
+ Encodes the value and return the result as a JWE token
2359
+
2360
+ ```xs
2361
+ "hello"|crypto_jwe_encode:{sub: "1234567890",name: "John Doe",admin: true,iat: 1516239022}:"a-string-secret-at-least-256-bits-long":"A256KW":"A256CBC-HS512"
2362
+ ```
2363
+
2364
+ Result: `"...encrypted..."`
2365
+
2366
+ # jwe_decode
2367
+
2368
+ Decodes the JWE token and return the result
2369
+
2370
+ ```xs
2371
+ "eyJ...Xw"|jwe_decode:{}:"a-string-secret-at-least-256-bits-long":"A256KW":"A256CBC-HS512"
2372
+ ```
2373
+
2374
+ Result: `"hello"`
2375
+
2376
+ # !crypto_jwe_decode:jwe_decode
2377
+
2378
+ Decodes the JWE token and return the result
2379
+
2380
+ ```xs
2381
+ "eyJ...Xw"|crypto_jwe_decode:{}:"a-string-secret-at-least-256-bits-long":"A256KW":"A256CBC-HS512"
2382
+ ```
2383
+
2384
+ Result: `"hello"`
2385
+
2386
+ # concat
2387
+
2388
+ Concatenates two values together
2389
+
2390
+ ```xs
2391
+ "Hello" | concat:"World!":" - "
2392
+ ```
2393
+
2394
+ Result: `"Hello - World!"`
2395
+
2396
+ # sprintf
2397
+
2398
+ formats text with variable substitution
2399
+
2400
+ ```xs
2401
+ "Hello %s, you have %d new messages"|sprintf:"Bob":5
2402
+ ```
2403
+
2404
+ Result: `"Hello Bob, you have 5 new messages"`
2405
+
2406
+ # replace
2407
+
2408
+ Replace all occurrences of a text phrase with another
2409
+
2410
+ ```xs
2411
+ "Hella World"|replace:"o":"a"
2412
+ ```
2413
+
2414
+ Result: `"Hella Warld"`
2415
+
2416
+ # !string_replace:replace
2417
+
2418
+ Replace all occurrences of a text phrase with another
2419
+
2420
+ ```xs
2421
+ "Hello World"|string_replace:"o":"a"
2422
+ ```
2423
+
2424
+ Result: `"Hella Warld"`
2425
+
2426
+ # secureid_encode
2427
+
2428
+ Returns an encrypted version of the id
2429
+
2430
+ ```xs
2431
+ 12345|secureid_encode:"my_salt"
2432
+ ```
2433
+
2434
+ Result: `"ZlV3Lg.-0-UZyQ9xQk"`
2435
+
2436
+ # secureid_decode
2437
+
2438
+ Returns the id of the original encode
2439
+
2440
+ ```xs
2441
+ "ZlV3Lg.-0-UZyQ9xQk"|secureid_decode:"my_salt"
2442
+ ```
2443
+
2444
+ Result: `12345`
2445
+
2446
+ # md5
2447
+
2448
+ Returns a MD5 signature representation of the value
2449
+
2450
+ ```xs
2451
+ "some_message"|md5
2452
+ ```
2453
+
2454
+ Result: `"af8a2aae147de3350f6c0f1a075ede5d"`
2455
+
2456
+ # sha1
2457
+
2458
+ Returns a SHA1 signature representation of the value
2459
+
2460
+ ```xs
2461
+ "some_message"|sha1
2462
+ ```
2463
+
2464
+ Result: `"33a374032... (truncated) ..."`
2465
+
2466
+ # sha256
2467
+
2468
+ Returns a SHA256 signature representation of the value
2469
+
2470
+ ```xs
2471
+ "some_message"|sha256
2472
+ ```
2473
+
2474
+ Result: `"6cc869f10009fa1... (truncated) ..."`
2475
+
2476
+ # sha384
2477
+
2478
+ Returns a SHA384 signature representation of the value
2479
+
2480
+ ```xs
2481
+ "some_message"|sha384
2482
+ ```
2483
+
2484
+ Result: `"17a7717060650457... (truncated) ..."`
2485
+
2486
+ # sha512
2487
+
2488
+ Returns a SHA512 signature representation of the value
2489
+
2490
+ ```xs
2491
+ "some_message"|sha512
2492
+ ```
2493
+
2494
+ Result: `"40aaa4e84e7d98e472d240f1c84298de... (truncated) ..."`
2495
+
2496
+ # hmac_md5
2497
+
2498
+ Returns a MD5 signature representation of the value using a shared secret via the HMAC method
2499
+
2500
+ ```xs
2501
+ "some_message"|hmac_md5:MY_SECRET_KEY
2502
+ ```
2503
+
2504
+ Result: `"c4c1007ea935001cc7734b360395fb1d"`
2505
+
2506
+ # hmac_sha1
2507
+
2508
+ Returns a SHA1 signature representation of the value using a shared secret via the HMAC method
2509
+
2510
+ ```xs
2511
+ "some_message"|hmac_sha1:MY_SECRET_KEY
2512
+ ```
2513
+
2514
+ Result: `"83b48df25eda2... (truncated) ..."`
2515
+
2516
+ # hmac_sha256
2517
+
2518
+ Returns a SHA256 signature representation of the value using a shared secret via the HMAC method
2519
+
2520
+ ```xs
2521
+ "some_message"|hmac_sha256:MY_SECRET_KEY
2522
+ ```
2523
+
2524
+ Result: `"3e18fc78d5326e5... (truncated) ..."`
2525
+
2526
+ # hmac_sha384
2527
+
2528
+ Returns a SHA384 signature representation of the value using a shared secret via the HMAC method
2529
+
2530
+ ```xs
2531
+ "some_message"|hmac_sha384:MY_SECRET_KEY
2532
+ ```
2533
+
2534
+ Result: `"60818f7b6e6... (truncated) ..."`
2535
+
2536
+ # hmac_sha512
2537
+
2538
+ Returns a SHA512 signature representation of the value using a shared secret via the HMAC method
2539
+
2540
+ ```xs
2541
+ "some_message"|hmac_sha512:MY_SECRET_KEY
2542
+ ```
2543
+
2544
+ Result: `"880c17f6d5fa9e1ea3b7... (truncated) ..."`
2545
+
2546
+ # create_uid
2547
+
2548
+ Returns a unique 64bit unsigned int value seeded off the value
2549
+
2550
+ ```xs
2551
+ |create_uid
2552
+ ```
2553
+
2554
+ Result: `14567891234567890`
2555
+
2556
+ # !uid:create_uid
2557
+
2558
+ Returns a unique 64bit unsigned int value seeded off the value
2559
+
2560
+ ```xs
2561
+ |uid
2562
+ ```
2563
+
2564
+ Result: `14567891234567890`
2565
+
2566
+ # uuid
2567
+
2568
+ Returns a universally unique identifier
2569
+
2570
+ ```xs
2571
+ |uuid
2572
+ ```
2573
+
2574
+ Result: `"550e8400-e29b-41d4-a716-446655440000"`
2575
+
2576
+ # !uuid4:uuid
2577
+
2578
+ Returns a universally unique identifier
2579
+
2580
+ ```xs
2581
+ |uuid44
2582
+ ```
2583
+
2584
+ Result: `"550e8400-e29b-41d4-a716-446655440000"`
2585
+
2586
+ # parse_timestamp
2587
+
2588
+ Parse a timestamp from a flexible format.
2589
+
2590
+ ```xs
2591
+ "2023-08-15 13:45:30"|parse_timestamp:"Y-m-d H:i:s":"America/Los_Angeles"
2592
+ ```
2593
+
2594
+ Result: `"1692132330000"`
2595
+
2596
+ # !epochms_from_format:parse_timestamp
2597
+
2598
+ Parse a timestamp from a flexible format.
2599
+
2600
+ ```xs
2601
+ "2023-08-15 13:45:30"|epochms_from_format:"Y-m-d H:i:s":"America/Los_Angeles"
2602
+ ```
2603
+
2604
+ Result: `"1692132330000"`
2605
+
2606
+ # format_timestamp
2607
+
2608
+ Converts a timestamp into a human readable formatted date based on the supplied format
2609
+
2610
+ ```xs
2611
+ "1692132330000"|format_timestamp:"Y-m-d H:i:s":"America/New_York"
2612
+ ```
2613
+
2614
+ Result: `"2023-08-15 16:45:30"`
2615
+
2616
+ # !epochms_date:format_timestamp
2617
+
2618
+ Converts a timestamp into a human readable formatted date based on the supplied format
2619
+
2620
+ ```xs
2621
+ "1692132330000"|epochms_date:"Y-m-d H:i:s":"America/New_York"
2622
+ ```
2623
+
2624
+ Result: `"2023-08-15 16:45:30"`
2625
+
2626
+ # transform_timestamp
2627
+
2628
+ Takes a timestamp and applies a relative transformation to it. Ex. -7 days, last Monday, first day of this month
2629
+
2630
+ ```xs
2631
+ "2023-08-15T20:45:30.000Z"|transform_timestamp:"-7 days":"America/Los_Angeles"
2632
+ ```
2633
+
2634
+ Result: `"1691527530000"`
2635
+
2636
+ # !epochms_transform:transform_timestamp
2637
+
2638
+ Takes a timestamp and applies a relative transformation to it. Ex. -7 days, last Monday, first day of this month
2639
+
2640
+ ```xs
2641
+ "2023-08-15T20:45:30.000Z"|epochms_transform:"-7 days":"America/Los_Angeles"
2642
+ ```
2643
+
2644
+ Result: `"1691527530000"`
2645
+
2646
+ # add_secs_to_timestamp
2647
+
2648
+ Add seconds to a timestamp. (negative values are ok)
2649
+
2650
+ ```xs
2651
+ 1691527530000|add_secs_to_timestamp:60
2652
+ ```
2653
+
2654
+ Result: `1691527590000`
2655
+
2656
+ # !epochms_add_secs:add_secs_to_timestamp
2657
+
2658
+ Add seconds to a timestamp. (negative values are ok)
2659
+
2660
+ ```xs
2661
+ 1691527530000|epochms_add_secs:60
2662
+ ```
2663
+
2664
+ Result: `1691527590000`
2665
+
2666
+ # add_ms_to_timestamp
2667
+
2668
+ Add milliseconds to a timestamp. (negative values are ok)
2669
+
2670
+ ```xs
2671
+ monday|add_ms_to_timestamp:500
2672
+ ```
2673
+
2674
+ Result: `1758499200500`
2675
+
2676
+ # !epochms_add_ms:add_ms_to_timestamp
2677
+
2678
+ Add milliseconds to a timestamp. (negative values are ok)
2679
+
2680
+ ```xs
2681
+ monday|epochms_add_ms:500
2682
+ ```
2683
+
2684
+ Result: `1758499200500`
2685
+
2686
+ # regex_matches
2687
+
2688
+ Tests if a regular expression matches the supplied subject text.
2689
+
2690
+ ```xs
2691
+ "/^a.*c$/"|regex_matches:"abbbbc"
2692
+ ```
2693
+
2694
+ Result: `true`
2695
+
2696
+ # !regex_test:regex_matches
2697
+
2698
+ Tests if a regular expression matches the supplied subject text.
2699
+
2700
+ ```xs
2701
+ "/^a.*c$/"|regex_test:"abbbbc"
2702
+ ```
2703
+
2704
+ Result: `true`
2705
+
2706
+ # regex_get_first_match
2707
+
2708
+ Return the first set of matches performed by a regular expression on the supplied subject text.
2709
+
2710
+ ```xs
2711
+ "/(\w+)@(\w+).(\w+)/"|regex_get_first_match:"test@example.com"
2712
+ ```
2713
+
2714
+ Result: `["test@example.com","test","example","com"]`
2715
+
2716
+ # !regex_match:regex_get_first_match
2717
+
2718
+ Return the first set of matches performed by a regular expression on the supplied subject text.
2719
+
2720
+ ```xs
2721
+ "/(\w+)@(\w+).(\w+)/"|regex_match:"test@example.com"
2722
+ ```
2723
+
2724
+ Result: `["test@example.com","test","example","com"]`
2725
+
2726
+ # regex_get_all_matches
2727
+
2728
+ Return all matches performed by a regular expression on the supplied subject text.
2729
+
2730
+ ```xs
2731
+ "/\b\w+@\w+.\w+\b/"|regex_get_all_matches:"test@example.com"
2732
+ ```
2733
+
2734
+ Result: `[["test@example.com"]]`
2735
+
2736
+ # !regex_match_all:regex_get_all_matches
2737
+
2738
+ Return all matches performed by a regular expression on the supplied subject text.
2739
+
2740
+ ```xs
2741
+ "/\b\w+@\w+.\w+\b/"|regex_match_all:"test@example.com"
2742
+ ```
2743
+
2744
+ Result: `[["test@example.com"]]`
2745
+
2746
+ # regex_quote
2747
+
2748
+ Update the supplied text value to be properly escaped for regular expressions.
2749
+
2750
+ ```xs
2751
+ "Hello. How are you?"|regex_quote:"/"
2752
+ ```
2753
+
2754
+ Result: `"Hello\\. How are you\\?"`
2755
+
2756
+ # regex_replace
2757
+
2758
+ Perform a regular expression search and replace on the supplied subject text.
2759
+
2760
+ ```xs
2761
+ "/\s+/"|regex_replace:"-":"Hello World"
2762
+ ```
2763
+
2764
+ Result: `"Hello-World"`
2765
+
2766
+ # map
2767
+
2768
+ Creates a new array with the results of calling a provided function on every element in the calling array.
2769
+
2770
+ ```xs
2771
+ [{value: 2}, {value: 5}]|map:$$.value*2
2772
+ ```
2773
+
2774
+ Result: `double each value => [4,10]`
2775
+
2776
+ # filter
2777
+
2778
+ Filters the elements of an array based on the code block returning true to keep the element or false to skip it.
2779
+
2780
+ ```xs
2781
+ [{value: 2}, {value: 5}]|filter:$$.value%2==0
2782
+ ```
2783
+
2784
+ # some
2785
+
2786
+ Checks if at least one element in the array passes the test implemented by the provided function.
2787
+
2788
+ ```xs
2789
+ [{value: 2}, {value: 5}]|some:$$.value%2==0
2790
+ ```
2791
+
2792
+ Result: `at least one value is even => true`
2793
+
2794
+ # every
2795
+
2796
+ Checks if all elements in the array pass the test implemented by the provided function.
2797
+
2798
+ ```xs
2799
+ [{value: 2}, {value: 6}]|every:$$.value%2==0
2800
+ ```
2801
+
2802
+ Result: `all values are even => true`
2803
+
2804
+ # find
2805
+
2806
+ Finds if all elements in the array pass the test implemented by the provided function.
2807
+
2808
+ ```xs
2809
+ [{id: 1}, {id: 2}, {id: 3}]|find:$$.id==2
2810
+ ```
2811
+
2812
+ Result: `{id:2}`
2813
+
2814
+ # findIndex
2815
+
2816
+ Finds the index of the first element in the array that passes the test implemented by the provided function.
2817
+
2818
+ ```xs
2819
+ [{id: 1}, {id: 2}, {id: 3}]|findIndex:$$.id==2
2820
+ ```
2821
+
2822
+ Result: `1`
2823
+
2824
+ # reduce
2825
+
2826
+ Reduces the array to a single value using the code block to combine each element of the array.
2827
+
2828
+ ```xs
2829
+ [1,2,3,4,5]|reduce:$$+$result:10
2830
+ ```
2831
+
2832
+ Result: `25`
2833
+
2834
+ # pick
2835
+
2836
+ Pick keys from the object to create a new object of just those keys.
2837
+
2838
+ ```xs
2839
+ {a:1,b:2,c:3}|pick:[a,c]
2840
+ ```
2841
+
2842
+ Result: `{a:1,c:3}`
2843
+
2844
+ # unpick
2845
+
2846
+ Remove keys from the object to create a new object of the remaining keys.
2847
+
2848
+ ```xs
2849
+ {a:1,b:2,c:3}|unpick:[a,c]
2850
+ ```
2851
+
2852
+ Result: `{b:2}`