@nordcraft/std-lib 1.0.0

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 (348) hide show
  1. package/README.md +5 -0
  2. package/dist/actions/clearLocalStorage/handler.d.ts +3 -0
  3. package/dist/actions/clearLocalStorage/handler.js +5 -0
  4. package/dist/actions/clearLocalStorage/handler.js.map +1 -0
  5. package/dist/actions/clearSessionStorage/handler.d.ts +3 -0
  6. package/dist/actions/clearSessionStorage/handler.js +5 -0
  7. package/dist/actions/clearSessionStorage/handler.js.map +1 -0
  8. package/dist/actions/copyToClipboard/handler.d.ts +3 -0
  9. package/dist/actions/copyToClipboard/handler.js +8 -0
  10. package/dist/actions/copyToClipboard/handler.js.map +1 -0
  11. package/dist/actions/deleteFromLocalStorage/handler.d.ts +3 -0
  12. package/dist/actions/deleteFromLocalStorage/handler.js +8 -0
  13. package/dist/actions/deleteFromLocalStorage/handler.js.map +1 -0
  14. package/dist/actions/deleteFromSessionStorage/handler.d.ts +3 -0
  15. package/dist/actions/deleteFromSessionStorage/handler.js +8 -0
  16. package/dist/actions/deleteFromSessionStorage/handler.js.map +1 -0
  17. package/dist/actions/focus/handler.d.ts +3 -0
  18. package/dist/actions/focus/handler.js +7 -0
  19. package/dist/actions/focus/handler.js.map +1 -0
  20. package/dist/actions/gotToURL/handler.d.ts +3 -0
  21. package/dist/actions/gotToURL/handler.js +13 -0
  22. package/dist/actions/gotToURL/handler.js.map +1 -0
  23. package/dist/actions/interval/handler.d.ts +3 -0
  24. package/dist/actions/interval/handler.js +14 -0
  25. package/dist/actions/interval/handler.js.map +1 -0
  26. package/dist/actions/logToConsole/handler.d.ts +3 -0
  27. package/dist/actions/logToConsole/handler.js +6 -0
  28. package/dist/actions/logToConsole/handler.js.map +1 -0
  29. package/dist/actions/preventDefault/handler.d.ts +3 -0
  30. package/dist/actions/preventDefault/handler.js +6 -0
  31. package/dist/actions/preventDefault/handler.js.map +1 -0
  32. package/dist/actions/saveToLocalStorage/handler.d.ts +3 -0
  33. package/dist/actions/saveToLocalStorage/handler.js +8 -0
  34. package/dist/actions/saveToLocalStorage/handler.js.map +1 -0
  35. package/dist/actions/saveToSessionStorage/handler.d.ts +3 -0
  36. package/dist/actions/saveToSessionStorage/handler.js +8 -0
  37. package/dist/actions/saveToSessionStorage/handler.js.map +1 -0
  38. package/dist/actions/setSessionCookies/handler.d.ts +3 -0
  39. package/dist/actions/setSessionCookies/handler.js +19 -0
  40. package/dist/actions/setSessionCookies/handler.js.map +1 -0
  41. package/dist/actions/share/handler.d.ts +3 -0
  42. package/dist/actions/share/handler.js +23 -0
  43. package/dist/actions/share/handler.js.map +1 -0
  44. package/dist/actions/sleep/handler.d.ts +3 -0
  45. package/dist/actions/sleep/handler.js +14 -0
  46. package/dist/actions/sleep/handler.js.map +1 -0
  47. package/dist/actions/stopPropagation/handler.d.ts +3 -0
  48. package/dist/actions/stopPropagation/handler.js +6 -0
  49. package/dist/actions/stopPropagation/handler.js.map +1 -0
  50. package/dist/actions.d.ts +17 -0
  51. package/dist/actions.js +18 -0
  52. package/dist/actions.js.map +1 -0
  53. package/dist/formulas/absolute/handler.d.ts +3 -0
  54. package/dist/formulas/absolute/handler.js +9 -0
  55. package/dist/formulas/absolute/handler.js.map +1 -0
  56. package/dist/formulas/add/handler.d.ts +3 -0
  57. package/dist/formulas/add/handler.js +12 -0
  58. package/dist/formulas/add/handler.js.map +1 -0
  59. package/dist/formulas/append/handler.d.ts +3 -0
  60. package/dist/formulas/append/handler.js +9 -0
  61. package/dist/formulas/append/handler.js.map +1 -0
  62. package/dist/formulas/boolean/handler.d.ts +3 -0
  63. package/dist/formulas/boolean/handler.js +6 -0
  64. package/dist/formulas/boolean/handler.js.map +1 -0
  65. package/dist/formulas/branchName/handler.d.ts +3 -0
  66. package/dist/formulas/branchName/handler.js +5 -0
  67. package/dist/formulas/branchName/handler.js.map +1 -0
  68. package/dist/formulas/canShare/handler.d.ts +3 -0
  69. package/dist/formulas/canShare/handler.js +24 -0
  70. package/dist/formulas/canShare/handler.js.map +1 -0
  71. package/dist/formulas/capitalize/handler.d.ts +3 -0
  72. package/dist/formulas/capitalize/handler.js +12 -0
  73. package/dist/formulas/capitalize/handler.js.map +1 -0
  74. package/dist/formulas/clamp/handler.d.ts +3 -0
  75. package/dist/formulas/clamp/handler.js +17 -0
  76. package/dist/formulas/clamp/handler.js.map +1 -0
  77. package/dist/formulas/concatenate/handler.d.ts +3 -0
  78. package/dist/formulas/concatenate/handler.js +16 -0
  79. package/dist/formulas/concatenate/handler.js.map +1 -0
  80. package/dist/formulas/currentURL/handler.d.ts +3 -0
  81. package/dist/formulas/currentURL/handler.js +3 -0
  82. package/dist/formulas/currentURL/handler.js.map +1 -0
  83. package/dist/formulas/dateFromString/handler.d.ts +3 -0
  84. package/dist/formulas/dateFromString/handler.js +11 -0
  85. package/dist/formulas/dateFromString/handler.js.map +1 -0
  86. package/dist/formulas/dateFromTimestamp/handler.d.ts +3 -0
  87. package/dist/formulas/dateFromTimestamp/handler.js +11 -0
  88. package/dist/formulas/dateFromTimestamp/handler.js.map +1 -0
  89. package/dist/formulas/decodeBase64/handler.d.ts +3 -0
  90. package/dist/formulas/decodeBase64/handler.js +9 -0
  91. package/dist/formulas/decodeBase64/handler.js.map +1 -0
  92. package/dist/formulas/decodeURIComponent/handler.d.ts +3 -0
  93. package/dist/formulas/decodeURIComponent/handler.js +9 -0
  94. package/dist/formulas/decodeURIComponent/handler.js.map +1 -0
  95. package/dist/formulas/defaultTo/handler.d.ts +3 -0
  96. package/dist/formulas/defaultTo/handler.js +11 -0
  97. package/dist/formulas/defaultTo/handler.js.map +1 -0
  98. package/dist/formulas/deleteKey/handler.d.ts +3 -0
  99. package/dist/formulas/deleteKey/handler.js +39 -0
  100. package/dist/formulas/deleteKey/handler.js.map +1 -0
  101. package/dist/formulas/divide/handler.d.ts +3 -0
  102. package/dist/formulas/divide/handler.js +9 -0
  103. package/dist/formulas/divide/handler.js.map +1 -0
  104. package/dist/formulas/drop/handler.d.ts +3 -0
  105. package/dist/formulas/drop/handler.js +16 -0
  106. package/dist/formulas/drop/handler.js.map +1 -0
  107. package/dist/formulas/dropLast/handler.d.ts +3 -0
  108. package/dist/formulas/dropLast/handler.js +16 -0
  109. package/dist/formulas/dropLast/handler.js.map +1 -0
  110. package/dist/formulas/encodeBase64/handler.d.ts +3 -0
  111. package/dist/formulas/encodeBase64/handler.js +9 -0
  112. package/dist/formulas/encodeBase64/handler.js.map +1 -0
  113. package/dist/formulas/encodeJSON/handler.d.ts +3 -0
  114. package/dist/formulas/encodeJSON/handler.js +9 -0
  115. package/dist/formulas/encodeJSON/handler.js.map +1 -0
  116. package/dist/formulas/encodeURIComponent/handler.d.ts +3 -0
  117. package/dist/formulas/encodeURIComponent/handler.js +9 -0
  118. package/dist/formulas/encodeURIComponent/handler.js.map +1 -0
  119. package/dist/formulas/entries/handler.d.ts +6 -0
  120. package/dist/formulas/entries/handler.js +9 -0
  121. package/dist/formulas/entries/handler.js.map +1 -0
  122. package/dist/formulas/equals/handler.d.ts +3 -0
  123. package/dist/formulas/equals/handler.js +5 -0
  124. package/dist/formulas/equals/handler.js.map +1 -0
  125. package/dist/formulas/every/handler.d.ts +4 -0
  126. package/dist/formulas/every/handler.js +31 -0
  127. package/dist/formulas/every/handler.js.map +1 -0
  128. package/dist/formulas/filter/handler.d.ts +4 -0
  129. package/dist/formulas/filter/handler.js +34 -0
  130. package/dist/formulas/filter/handler.js.map +1 -0
  131. package/dist/formulas/find/handler.d.ts +4 -0
  132. package/dist/formulas/find/handler.js +31 -0
  133. package/dist/formulas/find/handler.js.map +1 -0
  134. package/dist/formulas/findIndex/handler.d.ts +4 -0
  135. package/dist/formulas/findIndex/handler.js +31 -0
  136. package/dist/formulas/findIndex/handler.js.map +1 -0
  137. package/dist/formulas/findLast/handler.d.ts +4 -0
  138. package/dist/formulas/findLast/handler.js +31 -0
  139. package/dist/formulas/findLast/handler.js.map +1 -0
  140. package/dist/formulas/first/handler.d.ts +3 -0
  141. package/dist/formulas/first/handler.js +9 -0
  142. package/dist/formulas/first/handler.js.map +1 -0
  143. package/dist/formulas/flatten/handler.d.ts +3 -0
  144. package/dist/formulas/flatten/handler.js +9 -0
  145. package/dist/formulas/flatten/handler.js.map +1 -0
  146. package/dist/formulas/formatDate/handler.d.ts +3 -0
  147. package/dist/formulas/formatDate/handler.js +69 -0
  148. package/dist/formulas/formatDate/handler.js.map +1 -0
  149. package/dist/formulas/formatNumber/handler.d.ts +3 -0
  150. package/dist/formulas/formatNumber/handler.js +82 -0
  151. package/dist/formulas/formatNumber/handler.js.map +1 -0
  152. package/dist/formulas/fromEntries/handler.d.ts +3 -0
  153. package/dist/formulas/fromEntries/handler.js +13 -0
  154. package/dist/formulas/fromEntries/handler.js.map +1 -0
  155. package/dist/formulas/get/handler.d.ts +3 -0
  156. package/dist/formulas/get/handler.js +15 -0
  157. package/dist/formulas/get/handler.js.map +1 -0
  158. package/dist/formulas/getCookie/handler.d.ts +3 -0
  159. package/dist/formulas/getCookie/handler.js +19 -0
  160. package/dist/formulas/getCookie/handler.js.map +1 -0
  161. package/dist/formulas/getElementById/handler.d.ts +3 -0
  162. package/dist/formulas/getElementById/handler.js +9 -0
  163. package/dist/formulas/getElementById/handler.js.map +1 -0
  164. package/dist/formulas/getFromLocalStorage/handler.d.ts +3 -0
  165. package/dist/formulas/getFromLocalStorage/handler.js +21 -0
  166. package/dist/formulas/getFromLocalStorage/handler.js.map +1 -0
  167. package/dist/formulas/getFromSessionStorage/handler.d.ts +3 -0
  168. package/dist/formulas/getFromSessionStorage/handler.js +21 -0
  169. package/dist/formulas/getFromSessionStorage/handler.js.map +1 -0
  170. package/dist/formulas/getHttpOnlyCookie/handler.d.ts +3 -0
  171. package/dist/formulas/getHttpOnlyCookie/handler.js +9 -0
  172. package/dist/formulas/getHttpOnlyCookie/handler.js.map +1 -0
  173. package/dist/formulas/greaterOrEqueal/handler.d.ts +3 -0
  174. package/dist/formulas/greaterOrEqueal/handler.js +5 -0
  175. package/dist/formulas/greaterOrEqueal/handler.js.map +1 -0
  176. package/dist/formulas/greaterThan/handler.d.ts +3 -0
  177. package/dist/formulas/greaterThan/handler.js +5 -0
  178. package/dist/formulas/greaterThan/handler.js.map +1 -0
  179. package/dist/formulas/groupBy/handler.d.ts +4 -0
  180. package/dist/formulas/groupBy/handler.js +26 -0
  181. package/dist/formulas/groupBy/handler.js.map +1 -0
  182. package/dist/formulas/includes/handler.d.ts +3 -0
  183. package/dist/formulas/includes/handler.js +12 -0
  184. package/dist/formulas/includes/handler.js.map +1 -0
  185. package/dist/formulas/indexOf/handler.d.ts +3 -0
  186. package/dist/formulas/indexOf/handler.js +12 -0
  187. package/dist/formulas/indexOf/handler.js.map +1 -0
  188. package/dist/formulas/isServer/handler.d.ts +3 -0
  189. package/dist/formulas/isServer/handler.js +5 -0
  190. package/dist/formulas/isServer/handler.js.map +1 -0
  191. package/dist/formulas/join/handler.d.ts +3 -0
  192. package/dist/formulas/join/handler.js +9 -0
  193. package/dist/formulas/join/handler.js.map +1 -0
  194. package/dist/formulas/json/handler.d.ts +3 -0
  195. package/dist/formulas/json/handler.js +6 -0
  196. package/dist/formulas/json/handler.js.map +1 -0
  197. package/dist/formulas/keyBy/handler.d.ts +4 -0
  198. package/dist/formulas/keyBy/handler.js +35 -0
  199. package/dist/formulas/keyBy/handler.js.map +1 -0
  200. package/dist/formulas/languages/handler.d.ts +3 -0
  201. package/dist/formulas/languages/handler.js +12 -0
  202. package/dist/formulas/languages/handler.js.map +1 -0
  203. package/dist/formulas/last/handler.d.ts +3 -0
  204. package/dist/formulas/last/handler.js +9 -0
  205. package/dist/formulas/last/handler.js.map +1 -0
  206. package/dist/formulas/lastIndexOf/handler.d.ts +3 -0
  207. package/dist/formulas/lastIndexOf/handler.js +12 -0
  208. package/dist/formulas/lastIndexOf/handler.js.map +1 -0
  209. package/dist/formulas/lessOrEqual/handler.d.ts +3 -0
  210. package/dist/formulas/lessOrEqual/handler.js +5 -0
  211. package/dist/formulas/lessOrEqual/handler.js.map +1 -0
  212. package/dist/formulas/lessThan/handler.d.ts +3 -0
  213. package/dist/formulas/lessThan/handler.js +5 -0
  214. package/dist/formulas/lessThan/handler.js.map +1 -0
  215. package/dist/formulas/logarithm/handler.d.ts +3 -0
  216. package/dist/formulas/logarithm/handler.js +13 -0
  217. package/dist/formulas/logarithm/handler.js.map +1 -0
  218. package/dist/formulas/lowercase/handler.d.ts +3 -0
  219. package/dist/formulas/lowercase/handler.js +9 -0
  220. package/dist/formulas/lowercase/handler.js.map +1 -0
  221. package/dist/formulas/map/handler.d.ts +4 -0
  222. package/dist/formulas/map/handler.js +37 -0
  223. package/dist/formulas/map/handler.js.map +1 -0
  224. package/dist/formulas/matches/handler.d.ts +3 -0
  225. package/dist/formulas/matches/handler.js +15 -0
  226. package/dist/formulas/matches/handler.js.map +1 -0
  227. package/dist/formulas/max/handler.d.ts +3 -0
  228. package/dist/formulas/max/handler.js +5 -0
  229. package/dist/formulas/max/handler.js.map +1 -0
  230. package/dist/formulas/min/handler.d.ts +3 -0
  231. package/dist/formulas/min/handler.js +5 -0
  232. package/dist/formulas/min/handler.js.map +1 -0
  233. package/dist/formulas/minus/handler.d.ts +3 -0
  234. package/dist/formulas/minus/handler.js +11 -0
  235. package/dist/formulas/minus/handler.js.map +1 -0
  236. package/dist/formulas/modulo/handler.d.ts +3 -0
  237. package/dist/formulas/modulo/handler.js +8 -0
  238. package/dist/formulas/modulo/handler.js.map +1 -0
  239. package/dist/formulas/multiply/handler.d.ts +3 -0
  240. package/dist/formulas/multiply/handler.js +8 -0
  241. package/dist/formulas/multiply/handler.js.map +1 -0
  242. package/dist/formulas/not/handler.d.ts +3 -0
  243. package/dist/formulas/not/handler.js +4 -0
  244. package/dist/formulas/not/handler.js.map +1 -0
  245. package/dist/formulas/notEqual/handler.d.ts +3 -0
  246. package/dist/formulas/notEqual/handler.js +5 -0
  247. package/dist/formulas/notEqual/handler.js.map +1 -0
  248. package/dist/formulas/now/handler.d.ts +3 -0
  249. package/dist/formulas/now/handler.js +5 -0
  250. package/dist/formulas/now/handler.js.map +1 -0
  251. package/dist/formulas/number/handler.d.ts +3 -0
  252. package/dist/formulas/number/handler.js +3 -0
  253. package/dist/formulas/number/handler.js.map +1 -0
  254. package/dist/formulas/parseJSON/handler.d.ts +3 -0
  255. package/dist/formulas/parseJSON/handler.js +15 -0
  256. package/dist/formulas/parseJSON/handler.js.map +1 -0
  257. package/dist/formulas/parseURL/handler.d.ts +12 -0
  258. package/dist/formulas/parseURL/handler.js +27 -0
  259. package/dist/formulas/parseURL/handler.js.map +1 -0
  260. package/dist/formulas/power/handler.d.ts +3 -0
  261. package/dist/formulas/power/handler.js +8 -0
  262. package/dist/formulas/power/handler.js.map +1 -0
  263. package/dist/formulas/prepend/handler.d.ts +3 -0
  264. package/dist/formulas/prepend/handler.js +9 -0
  265. package/dist/formulas/prepend/handler.js.map +1 -0
  266. package/dist/formulas/randomNumber/handler.d.ts +3 -0
  267. package/dist/formulas/randomNumber/handler.js +5 -0
  268. package/dist/formulas/randomNumber/handler.js.map +1 -0
  269. package/dist/formulas/range/handler.d.ts +3 -0
  270. package/dist/formulas/range/handler.js +14 -0
  271. package/dist/formulas/range/handler.js.map +1 -0
  272. package/dist/formulas/reduce/handler.d.ts +4 -0
  273. package/dist/formulas/reduce/handler.js +45 -0
  274. package/dist/formulas/reduce/handler.js.map +1 -0
  275. package/dist/formulas/replaceAll/handler.d.ts +3 -0
  276. package/dist/formulas/replaceAll/handler.js +17 -0
  277. package/dist/formulas/replaceAll/handler.js.map +1 -0
  278. package/dist/formulas/reverse/handler.d.ts +3 -0
  279. package/dist/formulas/reverse/handler.js +9 -0
  280. package/dist/formulas/reverse/handler.js.map +1 -0
  281. package/dist/formulas/round/handler.d.ts +3 -0
  282. package/dist/formulas/round/handler.js +14 -0
  283. package/dist/formulas/round/handler.js.map +1 -0
  284. package/dist/formulas/roundDown/handler.d.ts +3 -0
  285. package/dist/formulas/roundDown/handler.js +14 -0
  286. package/dist/formulas/roundDown/handler.js.map +1 -0
  287. package/dist/formulas/roundUp/handler.d.ts +3 -0
  288. package/dist/formulas/roundUp/handler.js +14 -0
  289. package/dist/formulas/roundUp/handler.js.map +1 -0
  290. package/dist/formulas/set/handler.d.ts +3 -0
  291. package/dist/formulas/set/handler.js +22 -0
  292. package/dist/formulas/set/handler.js.map +1 -0
  293. package/dist/formulas/shuffle/handler.d.ts +3 -0
  294. package/dist/formulas/shuffle/handler.js +21 -0
  295. package/dist/formulas/shuffle/handler.js.map +1 -0
  296. package/dist/formulas/size/handler.d.ts +3 -0
  297. package/dist/formulas/size/handler.js +16 -0
  298. package/dist/formulas/size/handler.js.map +1 -0
  299. package/dist/formulas/some/handler.d.ts +4 -0
  300. package/dist/formulas/some/handler.js +31 -0
  301. package/dist/formulas/some/handler.js.map +1 -0
  302. package/dist/formulas/sort_by/handler.d.ts +4 -0
  303. package/dist/formulas/sort_by/handler.js +40 -0
  304. package/dist/formulas/sort_by/handler.js.map +1 -0
  305. package/dist/formulas/split/handler.d.ts +3 -0
  306. package/dist/formulas/split/handler.js +13 -0
  307. package/dist/formulas/split/handler.js.map +1 -0
  308. package/dist/formulas/squareRoot/handler.d.ts +3 -0
  309. package/dist/formulas/squareRoot/handler.js +9 -0
  310. package/dist/formulas/squareRoot/handler.js.map +1 -0
  311. package/dist/formulas/startsWith/handler.d.ts +3 -0
  312. package/dist/formulas/startsWith/handler.js +13 -0
  313. package/dist/formulas/startsWith/handler.js.map +1 -0
  314. package/dist/formulas/string/handler.d.ts +3 -0
  315. package/dist/formulas/string/handler.js +3 -0
  316. package/dist/formulas/string/handler.js.map +1 -0
  317. package/dist/formulas/sum/handler.d.ts +3 -0
  318. package/dist/formulas/sum/handler.js +17 -0
  319. package/dist/formulas/sum/handler.js.map +1 -0
  320. package/dist/formulas/take/handler.d.ts +3 -0
  321. package/dist/formulas/take/handler.js +16 -0
  322. package/dist/formulas/take/handler.js.map +1 -0
  323. package/dist/formulas/takeLast/handler.d.ts +3 -0
  324. package/dist/formulas/takeLast/handler.js +16 -0
  325. package/dist/formulas/takeLast/handler.js.map +1 -0
  326. package/dist/formulas/timestamp/handler.d.ts +3 -0
  327. package/dist/formulas/timestamp/handler.js +9 -0
  328. package/dist/formulas/timestamp/handler.js.map +1 -0
  329. package/dist/formulas/trim/handler.d.ts +3 -0
  330. package/dist/formulas/trim/handler.js +9 -0
  331. package/dist/formulas/trim/handler.js.map +1 -0
  332. package/dist/formulas/typeOf/handler.d.ts +3 -0
  333. package/dist/formulas/typeOf/handler.js +22 -0
  334. package/dist/formulas/typeOf/handler.js.map +1 -0
  335. package/dist/formulas/unique/handler.d.ts +3 -0
  336. package/dist/formulas/unique/handler.js +17 -0
  337. package/dist/formulas/unique/handler.js.map +1 -0
  338. package/dist/formulas/uppercase/handler.d.ts +3 -0
  339. package/dist/formulas/uppercase/handler.js +9 -0
  340. package/dist/formulas/uppercase/handler.js.map +1 -0
  341. package/dist/formulas/userAgent/handler.d.ts +3 -0
  342. package/dist/formulas/userAgent/handler.js +10 -0
  343. package/dist/formulas/userAgent/handler.js.map +1 -0
  344. package/dist/formulas.d.ts +98 -0
  345. package/dist/formulas.js +99 -0
  346. package/dist/formulas.js.map +1 -0
  347. package/dist/lib.ts +3360 -0
  348. package/package.json +21 -0
package/dist/lib.ts ADDED
@@ -0,0 +1,3360 @@
1
+
2
+ export const formulas = {
3
+ "@toddle/notEqual": {
4
+ "name": "Not equal",
5
+ "description": "Returns True if the values are NOT identical",
6
+ "arguments": [
7
+ {
8
+ "name": "First",
9
+ "formula": {
10
+ "type": "value",
11
+ "value": ""
12
+ },
13
+ "description": "First Value",
14
+ "type": {
15
+ "type": "Any"
16
+ }
17
+ },
18
+ {
19
+ "name": "Second",
20
+ "formula": {
21
+ "type": "value",
22
+ "value": ""
23
+ },
24
+ "description": "Second Value",
25
+ "type": {
26
+ "type": "Any"
27
+ }
28
+ }
29
+ ],
30
+ "output": {
31
+ "description": "True if the values are not identical, otherwise False",
32
+ "type": {
33
+ "type": "Any"
34
+ }
35
+ }
36
+ },
37
+ "@toddle/findLast": {
38
+ "name": "Find Last",
39
+ "description": "Search through the array of items and apply the predicate formula to each item. Returns the last item where the predicate formula returns TRUE",
40
+ "arguments": [
41
+ {
42
+ "name": "Array",
43
+ "formula": {
44
+ "type": "value",
45
+ "value": null
46
+ },
47
+ "description": "The array to search through",
48
+ "type": {
49
+ "type": "Array"
50
+ }
51
+ },
52
+ {
53
+ "name": "Formula",
54
+ "isFunction": true,
55
+ "formula": {
56
+ "type": "path",
57
+ "path": [
58
+ "Args",
59
+ "item"
60
+ ]
61
+ },
62
+ "description": "The predicate formula that each item in the array is passed to",
63
+ "type": {
64
+ "type": "Formula"
65
+ }
66
+ }
67
+ ],
68
+ "output": {
69
+ "description": "The last item in the array where the formula returned TRUE. Returns NULL if the predicate formula did not return TRUE for any item.",
70
+ "type": {
71
+ "type": "Any"
72
+ }
73
+ }
74
+ },
75
+ "@toddle/userAgent": {
76
+ "name": "User Agent",
77
+ "description": "Returns the user agent for the browser or from the User-Agent header on the server",
78
+ "arguments": [],
79
+ "output": {
80
+ "description": "The user agent string.",
81
+ "type": {
82
+ "type": "String"
83
+ }
84
+ }
85
+ },
86
+ "@toddle/round": {
87
+ "name": "Round",
88
+ "description": "Round to the nearest decimal point",
89
+ "arguments": [
90
+ {
91
+ "name": "Input",
92
+ "description": "Number to round",
93
+ "type": {
94
+ "type": "Number"
95
+ },
96
+ "formula": {
97
+ "type": "value",
98
+ "value": 1
99
+ }
100
+ },
101
+ {
102
+ "name": "Decimals",
103
+ "description": "Number of decimals to round to",
104
+ "type": {
105
+ "type": "Number"
106
+ },
107
+ "formula": {
108
+ "type": "value",
109
+ "value": 0
110
+ }
111
+ }
112
+ ],
113
+ "output": {
114
+ "type": {
115
+ "type": "Number"
116
+ },
117
+ "description": "Rounded number"
118
+ }
119
+ },
120
+ "@toddle/defaultTo": {
121
+ "name": "Default to",
122
+ "description": "Returns the first value that is not False or Null",
123
+ "arguments": [
124
+ {
125
+ "name": "0",
126
+ "formula": {
127
+ "type": "value",
128
+ "value": null
129
+ },
130
+ "description": "The inital value",
131
+ "type": {
132
+ "type": "Any"
133
+ }
134
+ },
135
+ {
136
+ "name": "1",
137
+ "description": "The first fallback value to be used if the primary is Null or False",
138
+ "type": {
139
+ "type": "Any"
140
+ },
141
+ "formula": {
142
+ "type": "value",
143
+ "value": "default"
144
+ }
145
+ }
146
+ ],
147
+ "variableArguments": true,
148
+ "output": {
149
+ "description": "Returns the first value that is not False or Null. Returns Null if no valid values is given",
150
+ "type": {
151
+ "type": "Any"
152
+ }
153
+ }
154
+ },
155
+ "@toddle/multiply": {
156
+ "name": "Multiply",
157
+ "description": "Multiply two or more numbers",
158
+ "arguments": [
159
+ {
160
+ "name": "0",
161
+ "formula": {
162
+ "type": "value",
163
+ "value": 1
164
+ },
165
+ "type": {
166
+ "type": "Number"
167
+ },
168
+ "description": "Number to be multiplied"
169
+ },
170
+ {
171
+ "name": "1",
172
+ "formula": {
173
+ "type": "value",
174
+ "value": 1
175
+ },
176
+ "type": {
177
+ "type": "Number"
178
+ },
179
+ "description": "Number to be multiplied"
180
+ }
181
+ ],
182
+ "variableArguments": true,
183
+ "output": {
184
+ "type": {
185
+ "type": "Number"
186
+ },
187
+ "description": "The product of multiplying all of the input numbers"
188
+ }
189
+ },
190
+ "@toddle/randomNumber": {
191
+ "name": "Random number",
192
+ "description": "return a random number between 0 and 1",
193
+ "arguments": [],
194
+ "cache": false,
195
+ "output": {
196
+ "description": "A random number between 0 and 1",
197
+ "type": {
198
+ "type": "Number"
199
+ }
200
+ }
201
+ },
202
+ "@toddle/reduce": {
203
+ "name": "Reduce",
204
+ "description": "Reduce an array of items to a single value by applying each item to a reducer formula",
205
+ "arguments": [
206
+ {
207
+ "name": "Array",
208
+ "formula": {
209
+ "type": "value",
210
+ "value": null
211
+ },
212
+ "description": "The array or Object of items to be reduced",
213
+ "type": {
214
+ "type": "Union",
215
+ "types": [
216
+ {
217
+ "type": "Array"
218
+ },
219
+ {
220
+ "type": "Object"
221
+ }
222
+ ]
223
+ }
224
+ },
225
+ {
226
+ "name": "Formula",
227
+ "isFunction": true,
228
+ "formula": {
229
+ "type": "value",
230
+ "value": null
231
+ },
232
+ "description": "The reducer formula.\n Each item in the array is applied to the formula along with the Accumulator. The result of this formula will be a new Accumulator used for the next item",
233
+ "type": {
234
+ "type": "Formula"
235
+ }
236
+ },
237
+ {
238
+ "name": "Accumulator",
239
+ "formula": {
240
+ "type": "value",
241
+ "value": null
242
+ },
243
+ "description": "The initial value of the accumulator. This value is passed to the reducer formula along with the first item in the array and the result is used as the accumulator for the next item",
244
+ "type": {
245
+ "type": "Any"
246
+ }
247
+ }
248
+ ],
249
+ "output": {
250
+ "description": "The value returned from applying the last item to the Reducer fx",
251
+ "type": {
252
+ "type": "Any"
253
+ }
254
+ }
255
+ },
256
+ "@toddle/includes": {
257
+ "name": "Includes",
258
+ "description": "Test if an array or string includes a specific item",
259
+ "arguments": [
260
+ {
261
+ "name": "Array",
262
+ "formula": {
263
+ "type": "value",
264
+ "value": ""
265
+ },
266
+ "description": "The array to search",
267
+ "type": {
268
+ "type": "Union",
269
+ "types": [
270
+ {
271
+ "type": "String"
272
+ },
273
+ {
274
+ "type": "Array"
275
+ }
276
+ ]
277
+ }
278
+ },
279
+ {
280
+ "name": "Item",
281
+ "formula": {
282
+ "type": "value",
283
+ "value": ""
284
+ },
285
+ "description": "The items to search for",
286
+ "type": {
287
+ "type": "Any"
288
+ }
289
+ }
290
+ ],
291
+ "output": {
292
+ "description": "True if the item exists in the array. Otherwise False",
293
+ "type": {
294
+ "type": "Boolean"
295
+ }
296
+ }
297
+ },
298
+ "@toddle/min": {
299
+ "name": "Min",
300
+ "description": "Find the smallest number",
301
+ "arguments": [
302
+ {
303
+ "name": "0",
304
+ "formula": {
305
+ "type": "value",
306
+ "value": null
307
+ },
308
+ "description": "Input number",
309
+ "type": {
310
+ "type": "Number"
311
+ }
312
+ },
313
+ {
314
+ "name": "1",
315
+ "formula": {
316
+ "type": "value",
317
+ "value": null
318
+ },
319
+ "description": "Input number",
320
+ "type": {
321
+ "type": "Number"
322
+ }
323
+ }
324
+ ],
325
+ "variableArguments": true,
326
+ "output": {
327
+ "description": "The smallest of all the input numbers",
328
+ "type": {
329
+ "type": "Number"
330
+ }
331
+ }
332
+ },
333
+ "@toddle/uppercase": {
334
+ "name": "Uppercase",
335
+ "description": "Convert a string to upper case",
336
+ "arguments": [
337
+ {
338
+ "name": "String",
339
+ "formula": {
340
+ "type": "value",
341
+ "value": "string"
342
+ },
343
+ "description": "Input string",
344
+ "type": {
345
+ "type": "String"
346
+ }
347
+ }
348
+ ],
349
+ "output": {
350
+ "description": "The input string with all characters converted to uppercase",
351
+ "type": {
352
+ "type": "String"
353
+ }
354
+ }
355
+ },
356
+ "@toddle/encodeURIComponent": {
357
+ "name": "Encode URI Component",
358
+ "description": "Encode a URI component escaping certain characters to their UTF-8 representation",
359
+ "arguments": [
360
+ {
361
+ "name": "URIComponent",
362
+ "formula": {
363
+ "type": "value",
364
+ "value": null
365
+ },
366
+ "description": "The URI component to encode",
367
+ "type": {
368
+ "type": "String"
369
+ }
370
+ }
371
+ ],
372
+ "output": {
373
+ "description": "The encoded URI component",
374
+ "type": {
375
+ "type": "String"
376
+ }
377
+ }
378
+ },
379
+ "@toddle/sort_by": {
380
+ "name": "Sort by",
381
+ "arguments": [
382
+ {
383
+ "name": "Array",
384
+ "formula": {
385
+ "type": "value",
386
+ "value": []
387
+ },
388
+ "type": {
389
+ "type": "Array"
390
+ },
391
+ "description": "The input array"
392
+ },
393
+ {
394
+ "name": "Formula",
395
+ "formula": {
396
+ "type": "path",
397
+ "path": [
398
+ "Args",
399
+ "item"
400
+ ]
401
+ },
402
+ "type": {
403
+ "type": "Formula"
404
+ },
405
+ "isFunction": true,
406
+ "description": "The sorting formula. The output of this formula will determine the sort order of the items. If the formula returns an array, the items will first be sorted by the first item, then second etc."
407
+ },
408
+ {
409
+ "name": "Ascending?",
410
+ "formula": {
411
+ "type": "value",
412
+ "value": true
413
+ },
414
+ "type": {
415
+ "type": "Boolean"
416
+ },
417
+ "description": "Should the list be sorted in ascending order?"
418
+ }
419
+ ],
420
+ "description": "Sort an array",
421
+ "output": {
422
+ "description": "The input array sorted by the value returned by the sorting formula",
423
+ "type": {
424
+ "type": "Number"
425
+ }
426
+ }
427
+ },
428
+ "@toddle/some": {
429
+ "name": "Some",
430
+ "description": "Returns True if the predicate formula returns true for any items in the array.",
431
+ "arguments": [
432
+ {
433
+ "name": "Array",
434
+ "formula": {
435
+ "type": "value",
436
+ "value": null
437
+ },
438
+ "description": "The array of items to evaluate",
439
+ "type": {
440
+ "type": "Array"
441
+ }
442
+ },
443
+ {
444
+ "name": "Formula",
445
+ "isFunction": true,
446
+ "formula": {
447
+ "type": "path",
448
+ "path": [
449
+ "Args",
450
+ "item"
451
+ ]
452
+ },
453
+ "description": "Predicate formula for evaluating each item",
454
+ "type": {
455
+ "type": "Formula"
456
+ }
457
+ }
458
+ ],
459
+ "output": {
460
+ "description": "True if the predicate formula returns true for any items in the array, otherwise False",
461
+ "type": {
462
+ "type": "Boolean"
463
+ }
464
+ }
465
+ },
466
+ "@toddle/roundUp": {
467
+ "name": "Round up",
468
+ "description": "Round up to the nearest decimal point",
469
+ "arguments": [
470
+ {
471
+ "name": "Input",
472
+ "description": "Number to round up",
473
+ "type": {
474
+ "type": "Number"
475
+ },
476
+ "formula": {
477
+ "type": "value",
478
+ "value": 1
479
+ }
480
+ },
481
+ {
482
+ "name": "Decimals",
483
+ "description": "Number of decimals to round to",
484
+ "type": {
485
+ "type": "Number"
486
+ },
487
+ "formula": {
488
+ "type": "value",
489
+ "value": 0
490
+ }
491
+ }
492
+ ],
493
+ "output": {
494
+ "type": {
495
+ "type": "Number"
496
+ },
497
+ "description": "Rounded number"
498
+ }
499
+ },
500
+ "@toddle/not": {
501
+ "name": "Not",
502
+ "description": "The Boolean opposite of the input value",
503
+ "arguments": [
504
+ {
505
+ "name": "Input",
506
+ "formula": {
507
+ "type": "value",
508
+ "value": true
509
+ },
510
+ "description": "The input value",
511
+ "type": {
512
+ "type": "Boolean"
513
+ }
514
+ }
515
+ ],
516
+ "output": {
517
+ "description": "True if the input value is False and False if the input value is True",
518
+ "type": {
519
+ "type": "Boolean"
520
+ }
521
+ }
522
+ },
523
+ "@toddle/canShare": {
524
+ "name": "Can Share",
525
+ "description": "Returns a boolean indicating whether the provided data can be shared (with the \"Share\" action)",
526
+ "arguments": [
527
+ {
528
+ "name": "URL to share",
529
+ "type": {
530
+ "type": "String"
531
+ },
532
+ "formula": {
533
+ "type": "value",
534
+ "value": null
535
+ }
536
+ },
537
+ {
538
+ "name": "Title to share",
539
+ "type": {
540
+ "type": "String"
541
+ },
542
+ "formula": {
543
+ "type": "value",
544
+ "value": null
545
+ }
546
+ },
547
+ {
548
+ "name": "Text to share",
549
+ "type": {
550
+ "type": "String"
551
+ },
552
+ "formula": {
553
+ "type": "value",
554
+ "value": null
555
+ }
556
+ }
557
+ ]
558
+ },
559
+ "@toddle/decodeURIComponent": {
560
+ "name": "Decode URI Component",
561
+ "description": "Decode a URI component that was encoded with the Encode URI Component formula",
562
+ "arguments": [
563
+ {
564
+ "name": "EncodedURI",
565
+ "formula": {
566
+ "type": "value",
567
+ "value": null
568
+ },
569
+ "type": {
570
+ "type": "String"
571
+ },
572
+ "description": "The encoded URI to decode"
573
+ }
574
+ ],
575
+ "output": {
576
+ "description": "The decoded URI component",
577
+ "type": {
578
+ "type": "String"
579
+ }
580
+ }
581
+ },
582
+ "@toddle/set": {
583
+ "name": "Set",
584
+ "description": "Set a value in an object or array based on a specified path",
585
+ "arguments": [
586
+ {
587
+ "name": "Object",
588
+ "formula": {
589
+ "type": "value",
590
+ "value": null
591
+ },
592
+ "description": "The input object",
593
+ "type": {
594
+ "type": "Object"
595
+ }
596
+ },
597
+ {
598
+ "name": "Path",
599
+ "formula": {
600
+ "type": "value",
601
+ "value": "Key"
602
+ },
603
+ "description": "The Path can be either a Number, a string or an array of strings.",
604
+ "type": {
605
+ "type": "Union",
606
+ "types": [
607
+ {
608
+ "type": "Array"
609
+ },
610
+ {
611
+ "type": "String"
612
+ },
613
+ {
614
+ "type": "Number"
615
+ }
616
+ ]
617
+ }
618
+ },
619
+ {
620
+ "name": "Value",
621
+ "formula": {
622
+ "type": "value",
623
+ "value": "Item"
624
+ },
625
+ "description": "The value to set.",
626
+ "type": {
627
+ "type": "Any"
628
+ }
629
+ }
630
+ ],
631
+ "output": {
632
+ "description": "The Input Object with the new field",
633
+ "type": {
634
+ "type": "Object"
635
+ }
636
+ }
637
+ },
638
+ "@toddle/greaterThan": {
639
+ "name": "Greater than",
640
+ "description": "Returns TRUE if the First number is larger than the second",
641
+ "arguments": [
642
+ {
643
+ "name": "First",
644
+ "formula": {
645
+ "type": "value",
646
+ "value": ""
647
+ },
648
+ "description": "First value to be compared",
649
+ "type": {
650
+ "type": "Number"
651
+ }
652
+ },
653
+ {
654
+ "name": "Second",
655
+ "formula": {
656
+ "type": "value",
657
+ "value": ""
658
+ },
659
+ "description": "Second value to be compared",
660
+ "type": {
661
+ "type": "Number"
662
+ }
663
+ }
664
+ ],
665
+ "output": {
666
+ "description": "Returns TRUE if the First number is larger than the second",
667
+ "type": {
668
+ "type": "Number"
669
+ }
670
+ }
671
+ },
672
+ "@toddle/fromEntries": {
673
+ "name": "From entries",
674
+ "description": "Create a record from an array of entries.\n this formula is the reverse of Entries",
675
+ "arguments": [
676
+ {
677
+ "name": "Array",
678
+ "formula": {
679
+ "type": "value",
680
+ "value": null
681
+ },
682
+ "description": "The array of entries",
683
+ "type": {
684
+ "type": "Array"
685
+ }
686
+ }
687
+ ],
688
+ "output": {
689
+ "description": "An Object with all the entries from the input array.",
690
+ "type": {
691
+ "type": "Object"
692
+ }
693
+ }
694
+ },
695
+ "@toddle/filter": {
696
+ "name": "Filter",
697
+ "description": "Returns a new array containing only the elements for which the predicate formula evaluated to TRUE",
698
+ "arguments": [
699
+ {
700
+ "name": "Array",
701
+ "formula": {
702
+ "type": "value",
703
+ "value": null
704
+ },
705
+ "description": "The array of items to be filtered",
706
+ "type": {
707
+ "type": "Array"
708
+ }
709
+ },
710
+ {
711
+ "name": "Formula",
712
+ "isFunction": true,
713
+ "formula": {
714
+ "type": "path",
715
+ "path": [
716
+ "Args",
717
+ "item"
718
+ ]
719
+ },
720
+ "description": "Predicate formula for filtering items",
721
+ "type": {
722
+ "type": "Formula"
723
+ }
724
+ }
725
+ ],
726
+ "output": {
727
+ "description": "New array containing only the items for which the Formula evaluated to TRUE",
728
+ "type": {
729
+ "type": "Array"
730
+ }
731
+ }
732
+ },
733
+ "@toddle/find": {
734
+ "name": "Find",
735
+ "description": "Search through the array of items and apply the predicate formula to each item. Returns the first item where the predicate formula returns TRUE",
736
+ "arguments": [
737
+ {
738
+ "name": "Array",
739
+ "formula": {
740
+ "type": "value",
741
+ "value": null
742
+ },
743
+ "description": "The array to search through",
744
+ "type": {
745
+ "type": "Array"
746
+ }
747
+ },
748
+ {
749
+ "name": "Formula",
750
+ "isFunction": true,
751
+ "formula": {
752
+ "type": "path",
753
+ "path": [
754
+ "Args",
755
+ "item"
756
+ ]
757
+ },
758
+ "description": "The predicate formula that each item in the array is passed to",
759
+ "type": {
760
+ "type": "Formula"
761
+ }
762
+ }
763
+ ],
764
+ "output": {
765
+ "description": "The first item in the array where the formula returned TRUE. Returns NULL if the predicate formula did not return TRUE for any item.",
766
+ "type": {
767
+ "type": "Any"
768
+ }
769
+ }
770
+ },
771
+ "@toddle/parseURL": {
772
+ "name": "Parse URL",
773
+ "description": "Parse a URL",
774
+ "arguments": [
775
+ {
776
+ "name": "URL",
777
+ "formula": {
778
+ "type": "value",
779
+ "value": null
780
+ },
781
+ "description": "The URL value to parse",
782
+ "type": {
783
+ "type": "String"
784
+ }
785
+ },
786
+ {
787
+ "name": "Base",
788
+ "formula": {
789
+ "type": "value",
790
+ "value": null
791
+ },
792
+ "description": "An optional base for the URL. Use this to resolve relative URLs.",
793
+ "type": {
794
+ "type": "String"
795
+ }
796
+ }
797
+ ],
798
+ "output": {
799
+ "description": "An object with: \"hostname\", \"searchParams\", \"path\", \"hash\", \"href\", \"protocol\", \"port\", \"origin\"",
800
+ "type": {
801
+ "type": "Object"
802
+ }
803
+ }
804
+ },
805
+ "@toddle/drop": {
806
+ "name": "Drop",
807
+ "description": "Remove items from the start of an array or String.",
808
+ "arguments": [
809
+ {
810
+ "name": "Array",
811
+ "formula": {
812
+ "type": "value",
813
+ "value": null
814
+ },
815
+ "description": "Input array",
816
+ "type": {
817
+ "type": "Union",
818
+ "types": [
819
+ {
820
+ "type": "String"
821
+ },
822
+ {
823
+ "type": "Array"
824
+ }
825
+ ]
826
+ }
827
+ },
828
+ {
829
+ "name": "Count",
830
+ "formula": {
831
+ "type": "value",
832
+ "value": 1
833
+ },
834
+ "description": "Number of items to remove"
835
+ }
836
+ ],
837
+ "output": {
838
+ "description": "A copy of the list with out the first items",
839
+ "type": {
840
+ "type": "Union",
841
+ "types": [
842
+ {
843
+ "type": "String"
844
+ },
845
+ {
846
+ "type": "Array"
847
+ }
848
+ ]
849
+ }
850
+ }
851
+ },
852
+ "@toddle/last": {
853
+ "name": "Last",
854
+ "arguments": [
855
+ {
856
+ "name": "Array",
857
+ "formula": {
858
+ "type": "value",
859
+ "value": []
860
+ },
861
+ "type": {
862
+ "type": "Array"
863
+ },
864
+ "description": "The input array"
865
+ }
866
+ ],
867
+ "description": "Get the last item in an array",
868
+ "output": {
869
+ "description": "The last item in the array",
870
+ "type": {
871
+ "type": "Any"
872
+ }
873
+ }
874
+ },
875
+ "@toddle/clamp": {
876
+ "name": "Clamp",
877
+ "description": "Limit the VALUE to a specified Min and Max",
878
+ "arguments": [
879
+ {
880
+ "name": "Value",
881
+ "type": {
882
+ "type": "Number"
883
+ },
884
+ "formula": {
885
+ "type": "value",
886
+ "value": null
887
+ },
888
+ "description": "Number to round"
889
+ },
890
+ {
891
+ "name": "Min",
892
+ "type": {
893
+ "type": "Number"
894
+ },
895
+ "description": "The smallest allowed number",
896
+ "formula": {
897
+ "type": "value",
898
+ "value": 0
899
+ }
900
+ },
901
+ {
902
+ "name": "Max",
903
+ "type": {
904
+ "type": "Number"
905
+ },
906
+ "description": "The largest allowed number",
907
+ "formula": {
908
+ "type": "value",
909
+ "value": 100
910
+ }
911
+ }
912
+ ],
913
+ "output": {
914
+ "type": {
915
+ "type": "Number"
916
+ },
917
+ "description": "Returns the input value if between Min and Max. Other wise returns the Min or Max value"
918
+ }
919
+ },
920
+ "@toddle/currentURL": {
921
+ "name": "Current URL",
922
+ "description": "Returns the current URL of the browser. Use the \"Parse URL\" formula for working with the URL",
923
+ "arguments": [],
924
+ "cache": false,
925
+ "output": {
926
+ "description": "The browser's current URL as a string",
927
+ "type": {
928
+ "type": "String"
929
+ }
930
+ }
931
+ },
932
+ "@toddle/map": {
933
+ "name": "Map",
934
+ "description": "Pass each item of an array through the Mapping formula.",
935
+ "arguments": [
936
+ {
937
+ "name": "Array",
938
+ "formula": {
939
+ "type": "value",
940
+ "value": null
941
+ },
942
+ "description": "The array of items to be mapped",
943
+ "type": {
944
+ "type": "Array"
945
+ }
946
+ },
947
+ {
948
+ "name": "Formula",
949
+ "isFunction": true,
950
+ "formula": {
951
+ "type": "path",
952
+ "path": [
953
+ "Args",
954
+ "item"
955
+ ]
956
+ },
957
+ "description": "The mapping formula each item will be passed through",
958
+ "type": {
959
+ "type": "Formula"
960
+ }
961
+ }
962
+ ],
963
+ "output": {
964
+ "description": "A new array containing all the values returned from passing each array item through the Mapping formula",
965
+ "type": {
966
+ "type": "Array"
967
+ }
968
+ }
969
+ },
970
+ "@toddle/modulo": {
971
+ "name": "Modulo",
972
+ "description": "Get the remainder when dividing two integers",
973
+ "arguments": [
974
+ {
975
+ "name": "Dividend",
976
+ "formula": {
977
+ "type": "value",
978
+ "value": 1
979
+ },
980
+ "description": "The number to be divided",
981
+ "type": {
982
+ "type": "Number"
983
+ }
984
+ },
985
+ {
986
+ "name": "Divider",
987
+ "formula": {
988
+ "type": "value",
989
+ "value": 1
990
+ },
991
+ "description": "The number to divide by",
992
+ "type": {
993
+ "type": "Number"
994
+ }
995
+ }
996
+ ],
997
+ "output": {
998
+ "description": "The remainder when the Dividend is divided by the Divider",
999
+ "type": {
1000
+ "type": "Number"
1001
+ }
1002
+ }
1003
+ },
1004
+ "@toddle/getElementById": {
1005
+ "name": "Get element by id",
1006
+ "description": "Return a DOM element with the given id",
1007
+ "cache": false,
1008
+ "arguments": [
1009
+ {
1010
+ "name": "Id",
1011
+ "formula": {
1012
+ "type": "value",
1013
+ "value": "element-id"
1014
+ },
1015
+ "type": {
1016
+ "type": "String"
1017
+ },
1018
+ "description": "The id of the DOM element to return"
1019
+ }
1020
+ ],
1021
+ "output": {
1022
+ "description": "The DOM element with the given id, or null if no such element exists",
1023
+ "type": {
1024
+ "type": "Element"
1025
+ }
1026
+ }
1027
+ },
1028
+ "@toddle/replaceAll": {
1029
+ "name": "Replace all",
1030
+ "description": "Replace all occurrences of a substring in a string",
1031
+ "arguments": [
1032
+ {
1033
+ "name": "Input",
1034
+ "description": "The input string to search in",
1035
+ "type": "String",
1036
+ "required": true
1037
+ },
1038
+ {
1039
+ "name": "Search",
1040
+ "description": "The substring to search for",
1041
+ "type": "String",
1042
+ "required": true
1043
+ },
1044
+ {
1045
+ "name": "Replace with",
1046
+ "description": "The replacement value",
1047
+ "type": "String",
1048
+ "required": true
1049
+ }
1050
+ ],
1051
+ "output": {
1052
+ "type": "String",
1053
+ "name": "Output",
1054
+ "description": "The resulting string"
1055
+ }
1056
+ },
1057
+ "@toddle/findIndex": {
1058
+ "name": "Find index",
1059
+ "description": "Search through an array of items and apply the predicate formula to each item. Returns the index of the first item where the predicate formula returns TRUE",
1060
+ "arguments": [
1061
+ {
1062
+ "name": "Array",
1063
+ "formula": {
1064
+ "type": "value",
1065
+ "value": null
1066
+ },
1067
+ "description": "The array to search through",
1068
+ "type": {
1069
+ "type": "Array"
1070
+ }
1071
+ },
1072
+ {
1073
+ "name": "Formula",
1074
+ "isFunction": true,
1075
+ "formula": {
1076
+ "type": "path",
1077
+ "path": [
1078
+ "Args",
1079
+ "item"
1080
+ ]
1081
+ },
1082
+ "description": "The predicate formula that each item in the array is passed to",
1083
+ "type": {
1084
+ "type": "Formula"
1085
+ }
1086
+ }
1087
+ ],
1088
+ "output": {
1089
+ "description": "The index of the first item in the array where the predicate formula returned TRUE. Returns -1 if the predicate formula did not return TRUE for any item.",
1090
+ "type": {
1091
+ "type": "Any"
1092
+ }
1093
+ }
1094
+ },
1095
+ "@toddle/branchName": {
1096
+ "name": "Branch Name",
1097
+ "description": "Returns the name of the current branch. For production, the branch name is 'main'.",
1098
+ "arguments": [],
1099
+ "output": {
1100
+ "description": "Returns the name of the current branch.",
1101
+ "type": {
1102
+ "type": "String"
1103
+ }
1104
+ }
1105
+ },
1106
+ "@toddle/decodeBase64": {
1107
+ "name": "Decode base64",
1108
+ "arguments": [
1109
+ {
1110
+ "name": "Base64 value",
1111
+ "formula": {
1112
+ "type": "value",
1113
+ "value": "Input value"
1114
+ },
1115
+ "type": {
1116
+ "type": "String"
1117
+ },
1118
+ "description": "The input data encoded as base64"
1119
+ }
1120
+ ],
1121
+ "description": "Deocde a base64 string to utf-8",
1122
+ "output": {
1123
+ "description": "The decoded string",
1124
+ "type": {
1125
+ "type": "String"
1126
+ }
1127
+ }
1128
+ },
1129
+ "@toddle/string": {
1130
+ "name": "String",
1131
+ "arguments": [
1132
+ {
1133
+ "name": "Input",
1134
+ "description": "Value of any type",
1135
+ "type": {
1136
+ "type": "Any"
1137
+ },
1138
+ "formula": {
1139
+ "type": "value",
1140
+ "value": "1"
1141
+ }
1142
+ }
1143
+ ],
1144
+ "description": "Convert a value of any type to a String.",
1145
+ "output": {
1146
+ "description": "The input value converted to a String",
1147
+ "type": {
1148
+ "type": "String"
1149
+ }
1150
+ }
1151
+ },
1152
+ "@toddle/concatenate": {
1153
+ "name": "Concatenate",
1154
+ "description": "Concatenate 2 or more values. ",
1155
+ "arguments": [
1156
+ {
1157
+ "name": "0",
1158
+ "formula": {
1159
+ "type": "value",
1160
+ "value": ""
1161
+ },
1162
+ "type": {
1163
+ "type": "Union",
1164
+ "types": [
1165
+ {
1166
+ "type": "String"
1167
+ },
1168
+ {
1169
+ "type": "Array",
1170
+ "ofType": {
1171
+ "type": "Any"
1172
+ }
1173
+ }
1174
+ ]
1175
+ }
1176
+ }
1177
+ ],
1178
+ "variableArguments": true,
1179
+ "output": {
1180
+ "type": {
1181
+ "type": "Union",
1182
+ "types": [
1183
+ {
1184
+ "type": "String"
1185
+ },
1186
+ {
1187
+ "type": "Array",
1188
+ "ofType": {
1189
+ "type": "Any"
1190
+ }
1191
+ }
1192
+ ]
1193
+ },
1194
+ "description": "String or array containing all the input values."
1195
+ }
1196
+ },
1197
+ "@toddle/encodeJSON": {
1198
+ "name": "Encode JSON",
1199
+ "description": "Encode data as JSON",
1200
+ "arguments": [
1201
+ {
1202
+ "name": "Data",
1203
+ "formula": {
1204
+ "type": "value",
1205
+ "value": null
1206
+ },
1207
+ "description": "The data to convert",
1208
+ "type": {
1209
+ "type": "Any"
1210
+ }
1211
+ },
1212
+ {
1213
+ "name": "Indent",
1214
+ "formula": {
1215
+ "type": "value",
1216
+ "value": 2
1217
+ },
1218
+ "description": "How many characters indentation",
1219
+ "type": {
1220
+ "type": "Number"
1221
+ }
1222
+ }
1223
+ ],
1224
+ "output": {
1225
+ "description": "The encoded JSON value",
1226
+ "type": {
1227
+ "type": "String"
1228
+ }
1229
+ }
1230
+ },
1231
+ "@toddle/getFromSessionStorage": {
1232
+ "name": "Get from Session Storage",
1233
+ "description": "Read a value from Session Storage with the provided key. It tries to JSON decode the value",
1234
+ "cache": false,
1235
+ "arguments": [
1236
+ {
1237
+ "name": "Key",
1238
+ "formula": {
1239
+ "type": "value",
1240
+ "value": null
1241
+ },
1242
+ "description": "The key to read from Session Storage",
1243
+ "type": {
1244
+ "type": "String"
1245
+ }
1246
+ }
1247
+ ],
1248
+ "output": {
1249
+ "description": "The value found in Session Storage",
1250
+ "type": {
1251
+ "type": "Any"
1252
+ }
1253
+ }
1254
+ },
1255
+ "@toddle/equals": {
1256
+ "name": "Equals",
1257
+ "description": "Returns TRUE if the input values are identical",
1258
+ "arguments": [
1259
+ {
1260
+ "name": "First",
1261
+ "formula": {
1262
+ "type": "value",
1263
+ "value": ""
1264
+ },
1265
+ "description": "First Value",
1266
+ "type": {
1267
+ "type": "Any"
1268
+ }
1269
+ },
1270
+ {
1271
+ "name": "Second",
1272
+ "formula": {
1273
+ "type": "value",
1274
+ "value": ""
1275
+ },
1276
+ "description": "Second Value",
1277
+ "type": {
1278
+ "type": "Any"
1279
+ }
1280
+ }
1281
+ ],
1282
+ "output": {
1283
+ "description": "TRUE if the input values are identical, otherwise FALSE",
1284
+ "type": {
1285
+ "type": "Any"
1286
+ }
1287
+ }
1288
+ },
1289
+ "@toddle/unique": {
1290
+ "name": "Unique",
1291
+ "arguments": [
1292
+ {
1293
+ "name": "Array",
1294
+ "formula": {
1295
+ "type": "value",
1296
+ "value": []
1297
+ },
1298
+ "type": {
1299
+ "type": "Array"
1300
+ },
1301
+ "description": "The input array"
1302
+ }
1303
+ ],
1304
+ "description": "Remove duplicate values from an array",
1305
+ "output": {
1306
+ "description": "The input array with all duplicate values removed",
1307
+ "type": {
1308
+ "type": "Array"
1309
+ }
1310
+ }
1311
+ },
1312
+ "@toddle/reverse": {
1313
+ "name": "Reverse",
1314
+ "description": "Reverse the order of an array",
1315
+ "arguments": [
1316
+ {
1317
+ "name": "Array",
1318
+ "formula": {
1319
+ "type": "value",
1320
+ "value": null
1321
+ },
1322
+ "description": "The array to be reversed",
1323
+ "type": {
1324
+ "type": "Array"
1325
+ }
1326
+ }
1327
+ ],
1328
+ "output": {
1329
+ "type": {
1330
+ "type": "Array"
1331
+ },
1332
+ "description": "The reversed list"
1333
+ }
1334
+ },
1335
+ "@toddle/first": {
1336
+ "name": "First",
1337
+ "arguments": [
1338
+ {
1339
+ "name": "Array",
1340
+ "formula": {
1341
+ "type": "value",
1342
+ "value": []
1343
+ },
1344
+ "type": {
1345
+ "type": "Array"
1346
+ },
1347
+ "description": "The input list"
1348
+ }
1349
+ ],
1350
+ "description": "Get first item in an array",
1351
+ "output": {
1352
+ "description": "The first item in the array",
1353
+ "type": {
1354
+ "type": "Any"
1355
+ }
1356
+ }
1357
+ },
1358
+ "@toddle/minus": {
1359
+ "name": "Minus",
1360
+ "description": "Subtract two numbers",
1361
+ "arguments": [
1362
+ {
1363
+ "name": "Minuend",
1364
+ "formula": {
1365
+ "type": "value",
1366
+ "value": 1
1367
+ },
1368
+ "description": "The number to subtract from",
1369
+ "type": {
1370
+ "type": "Number"
1371
+ }
1372
+ },
1373
+ {
1374
+ "name": "Substrahend",
1375
+ "formula": {
1376
+ "type": "value",
1377
+ "value": 1
1378
+ },
1379
+ "description": "The number to subtract",
1380
+ "type": {
1381
+ "type": "Number"
1382
+ }
1383
+ }
1384
+ ],
1385
+ "output": {
1386
+ "description": "The result of subtracting the Substrahend from the Minuend",
1387
+ "type": {
1388
+ "type": "Number"
1389
+ }
1390
+ }
1391
+ },
1392
+ "@toddle/groupBy": {
1393
+ "name": "Group by",
1394
+ "description": "Groups an array of items into an object based on the grouping formula",
1395
+ "arguments": [
1396
+ {
1397
+ "name": "Array",
1398
+ "formula": {
1399
+ "type": "value",
1400
+ "value": null
1401
+ },
1402
+ "description": "Array of items to be grouped",
1403
+ "type": {
1404
+ "type": "Array"
1405
+ }
1406
+ },
1407
+ {
1408
+ "name": "Formula",
1409
+ "isFunction": true,
1410
+ "formula": {
1411
+ "type": "value",
1412
+ "value": null
1413
+ },
1414
+ "description": "The grouping formula used to group the items. The string returned from the formula will match the key in output Oject",
1415
+ "type": {
1416
+ "type": "Formula"
1417
+ }
1418
+ }
1419
+ ],
1420
+ "output": {
1421
+ "description": "An Object where each key matches a value returned by the grouping formula and each value is the list of items that share the return value",
1422
+ "type": {
1423
+ "type": "Object"
1424
+ }
1425
+ }
1426
+ },
1427
+ "@toddle/get": {
1428
+ "name": "Get",
1429
+ "description": "Extract a value from an object, array or string at the specified path.",
1430
+ "arguments": [
1431
+ {
1432
+ "name": "Object",
1433
+ "formula": {
1434
+ "type": "value",
1435
+ "value": null
1436
+ },
1437
+ "description": "The object, array or string you want to extract an item from",
1438
+ "type": {
1439
+ "type": "Union",
1440
+ "types": [
1441
+ {
1442
+ "type": "Object"
1443
+ },
1444
+ {
1445
+ "type": "Array"
1446
+ },
1447
+ {
1448
+ "type": "String"
1449
+ }
1450
+ ]
1451
+ }
1452
+ },
1453
+ {
1454
+ "name": "Path",
1455
+ "formula": {
1456
+ "type": "value",
1457
+ "value": "Item"
1458
+ },
1459
+ "description": "The Path can be either a number, a string or an array.",
1460
+ "type": {
1461
+ "type": "Union",
1462
+ "types": [
1463
+ {
1464
+ "type": "Array",
1465
+ "ofType": {
1466
+ "type": "String"
1467
+ }
1468
+ },
1469
+ {
1470
+ "type": "String"
1471
+ },
1472
+ {
1473
+ "type": "Number"
1474
+ }
1475
+ ]
1476
+ }
1477
+ }
1478
+ ],
1479
+ "output": {
1480
+ "description": "The value found at the path. If no value is found the NULL is returned",
1481
+ "type": {
1482
+ "type": "Any"
1483
+ }
1484
+ }
1485
+ },
1486
+ "@toddle/prepend": {
1487
+ "name": "Prepend",
1488
+ "arguments": [
1489
+ {
1490
+ "name": "Array",
1491
+ "type": {
1492
+ "type": "Array"
1493
+ },
1494
+ "description": "The array to prepend to",
1495
+ "formula": {
1496
+ "type": "array",
1497
+ "arguments": []
1498
+ }
1499
+ },
1500
+ {
1501
+ "name": "Item",
1502
+ "type": {
1503
+ "type": "Any"
1504
+ },
1505
+ "description": "The item to prepend to the array",
1506
+ "formula": {
1507
+ "type": "value",
1508
+ "value": "Item"
1509
+ }
1510
+ }
1511
+ ],
1512
+ "description": "Add an element to the start of an array",
1513
+ "output": {
1514
+ "description": "A new array containing the new item and all the elements from the input array",
1515
+ "type": {
1516
+ "type": "Array"
1517
+ }
1518
+ }
1519
+ },
1520
+ "@toddle/divide": {
1521
+ "name": "Divide",
1522
+ "description": "Divide to numbers",
1523
+ "arguments": [
1524
+ {
1525
+ "name": "Dividend",
1526
+ "description": "The number to be divided",
1527
+ "type": {
1528
+ "type": "Number"
1529
+ },
1530
+ "formula": {
1531
+ "type": "value",
1532
+ "value": 1
1533
+ }
1534
+ },
1535
+ {
1536
+ "name": "Divisor",
1537
+ "description": "The number divide by",
1538
+ "type": {
1539
+ "type": "Number"
1540
+ },
1541
+ "formula": {
1542
+ "type": "value",
1543
+ "value": 1
1544
+ }
1545
+ }
1546
+ ],
1547
+ "output": {
1548
+ "description": "The result of dividing the dividend with the divisor",
1549
+ "type": {
1550
+ "type": "Number"
1551
+ }
1552
+ }
1553
+ },
1554
+ "@toddle/dateFromString": {
1555
+ "name": "Date From String",
1556
+ "arguments": [
1557
+ {
1558
+ "name": "Date string",
1559
+ "description": "String representing a date - \"August 18, 1986\" for instance.",
1560
+ "type": {
1561
+ "type": "String"
1562
+ },
1563
+ "formula": {
1564
+ "type": "value",
1565
+ "value": "August 18, 1986"
1566
+ }
1567
+ }
1568
+ ],
1569
+ "description": "Convert a string to a Date.",
1570
+ "output": {
1571
+ "description": "The input value converted to a Date",
1572
+ "type": {
1573
+ "type": "Date"
1574
+ }
1575
+ }
1576
+ },
1577
+ "@toddle/typeOf": {
1578
+ "name": "Type of",
1579
+ "description": "Get the Type of a given Input",
1580
+ "arguments": [
1581
+ {
1582
+ "name": "Input",
1583
+ "formula": {
1584
+ "type": "value",
1585
+ "value": 1
1586
+ },
1587
+ "description": "The input",
1588
+ "type": {
1589
+ "type": "Any"
1590
+ }
1591
+ }
1592
+ ],
1593
+ "output": {
1594
+ "description": "The type of the input.\n Types can be one of: \n - String\n - Boolean\n - Number \n - Array \n - Object \n - Null",
1595
+ "type": {
1596
+ "type": "Any"
1597
+ }
1598
+ }
1599
+ },
1600
+ "@toddle/takeLast": {
1601
+ "name": "Take last",
1602
+ "description": "Take items from the end of an array or string.",
1603
+ "arguments": [
1604
+ {
1605
+ "name": "Array",
1606
+ "formula": {
1607
+ "type": "value",
1608
+ "value": null
1609
+ },
1610
+ "description": "Input array or string",
1611
+ "type": {
1612
+ "type": "Union",
1613
+ "types": [
1614
+ {
1615
+ "type": "String"
1616
+ },
1617
+ {
1618
+ "type": "Array"
1619
+ }
1620
+ ]
1621
+ }
1622
+ },
1623
+ {
1624
+ "name": "Count",
1625
+ "formula": {
1626
+ "type": "value",
1627
+ "value": 1
1628
+ },
1629
+ "description": "Number of items to take",
1630
+ "type": {
1631
+ "type": "Number"
1632
+ }
1633
+ }
1634
+ ],
1635
+ "output": {
1636
+ "description": "The last items from the array or string",
1637
+ "type": {
1638
+ "type": "Union",
1639
+ "types": [
1640
+ {
1641
+ "type": "String"
1642
+ },
1643
+ {
1644
+ "type": "Array"
1645
+ }
1646
+ ]
1647
+ }
1648
+ }
1649
+ },
1650
+ "@toddle/absolute": {
1651
+ "name": "Absolute",
1652
+ "arguments": [
1653
+ {
1654
+ "name": "Value",
1655
+ "formula": {
1656
+ "type": "value",
1657
+ "value": -1
1658
+ },
1659
+ "type": {
1660
+ "type": "Number"
1661
+ },
1662
+ "description": "The input number"
1663
+ }
1664
+ ],
1665
+ "description": "Get the absolute value of a number",
1666
+ "output": {
1667
+ "description": "The absolute value of the input",
1668
+ "type": {
1669
+ "type": "Number"
1670
+ }
1671
+ }
1672
+ },
1673
+ "@toddle/dropLast": {
1674
+ "name": "Drop last",
1675
+ "description": "Remove items from the end of an array or String.",
1676
+ "arguments": [
1677
+ {
1678
+ "name": "Array",
1679
+ "formula": {
1680
+ "type": "value",
1681
+ "value": null
1682
+ },
1683
+ "description": "Input array",
1684
+ "type": {
1685
+ "type": "Union",
1686
+ "types": [
1687
+ {
1688
+ "type": "String"
1689
+ },
1690
+ {
1691
+ "type": "Array"
1692
+ }
1693
+ ]
1694
+ }
1695
+ },
1696
+ {
1697
+ "name": "Count",
1698
+ "formula": {
1699
+ "type": "value",
1700
+ "value": 1
1701
+ },
1702
+ "type": {
1703
+ "type": "Number"
1704
+ },
1705
+ "description": "Number of items to remove"
1706
+ }
1707
+ ],
1708
+ "output": {
1709
+ "description": "A copy of the list without the last items",
1710
+ "type": {
1711
+ "type": "Union",
1712
+ "types": [
1713
+ {
1714
+ "type": "String"
1715
+ },
1716
+ {
1717
+ "type": "Array"
1718
+ }
1719
+ ]
1720
+ }
1721
+ }
1722
+ },
1723
+ "@toddle/deleteKey": {
1724
+ "name": "Delete",
1725
+ "description": "Returns a copy of the input object or array without the specified key.",
1726
+ "arguments": [
1727
+ {
1728
+ "name": "Object",
1729
+ "formula": {
1730
+ "type": "value",
1731
+ "value": null
1732
+ },
1733
+ "description": "The input record",
1734
+ "type": {
1735
+ "type": "Object"
1736
+ }
1737
+ },
1738
+ {
1739
+ "name": "Path",
1740
+ "formula": {
1741
+ "type": "value",
1742
+ "value": "Item"
1743
+ },
1744
+ "description": "The path can be either a number (if the first argument is an array), a string or an array of strings.\nIf an array is given then the property at that path will be removed.",
1745
+ "type": {
1746
+ "type": "Union",
1747
+ "types": [
1748
+ {
1749
+ "type": "Array"
1750
+ },
1751
+ {
1752
+ "type": "String"
1753
+ }
1754
+ ]
1755
+ }
1756
+ }
1757
+ ],
1758
+ "output": {
1759
+ "description": "A copy of the record without the property specified in the Path.",
1760
+ "type": {
1761
+ "type": "Object"
1762
+ }
1763
+ }
1764
+ },
1765
+ "@toddle/timestamp": {
1766
+ "name": "Timestamp",
1767
+ "arguments": [
1768
+ {
1769
+ "name": "Date",
1770
+ "description": "The Date to get the timestamp from",
1771
+ "type": {
1772
+ "type": "Date"
1773
+ },
1774
+ "formula": {
1775
+ "type": "value",
1776
+ "value": null
1777
+ }
1778
+ }
1779
+ ],
1780
+ "description": "Get the timestamp from a Date - 1633462980000 for instance (the first commit to toddle)",
1781
+ "output": {
1782
+ "description": "The timestamp from the Date input",
1783
+ "type": {
1784
+ "type": "Number"
1785
+ }
1786
+ }
1787
+ },
1788
+ "@toddle/entries": {
1789
+ "name": "Entries",
1790
+ "description": "Get an array of entries from the given Object",
1791
+ "arguments": [
1792
+ {
1793
+ "name": "Object",
1794
+ "formula": {
1795
+ "type": "value",
1796
+ "value": null
1797
+ },
1798
+ "description": "Input record",
1799
+ "type": {
1800
+ "type": "Object"
1801
+ }
1802
+ }
1803
+ ],
1804
+ "output": {
1805
+ "description": "Returns an array of entries for the given record.\nThe entries are Objects with a “Key” and “Value” property",
1806
+ "type": {
1807
+ "type": "Array"
1808
+ }
1809
+ }
1810
+ },
1811
+ "@toddle/trim": {
1812
+ "name": "Trim",
1813
+ "description": "Removes any leading and trailing white spaces from a string",
1814
+ "arguments": [
1815
+ {
1816
+ "name": "String",
1817
+ "formula": {
1818
+ "type": "value",
1819
+ "value": ""
1820
+ },
1821
+ "description": "The string to trim",
1822
+ "type": {
1823
+ "type": "String"
1824
+ }
1825
+ }
1826
+ ],
1827
+ "output": {
1828
+ "description": "The trimmed string",
1829
+ "type": {
1830
+ "type": "String"
1831
+ }
1832
+ }
1833
+ },
1834
+ "@toddle/flatten": {
1835
+ "name": "Flatten",
1836
+ "description": "Flattens a nested array",
1837
+ "arguments": [
1838
+ {
1839
+ "name": "Array",
1840
+ "description": "An array containing one or more arrays",
1841
+ "type": {
1842
+ "type": "Array"
1843
+ },
1844
+ "formula": {
1845
+ "type": "array",
1846
+ "arguments": []
1847
+ }
1848
+ }
1849
+ ],
1850
+ "output": {
1851
+ "description": "The flattened array where all items in the original array are concatenated",
1852
+ "type": {
1853
+ "type": "Array"
1854
+ }
1855
+ }
1856
+ },
1857
+ "@toddle/json": {
1858
+ "name": "JSON",
1859
+ "description": "Turn a value into a JSON string",
1860
+ "arguments": [
1861
+ {
1862
+ "name": "Input",
1863
+ "formula": {
1864
+ "type": "value",
1865
+ "value": null
1866
+ },
1867
+ "description": "The input value to be turned into a JSON string",
1868
+ "type": {
1869
+ "type": "Any"
1870
+ }
1871
+ },
1872
+ {
1873
+ "name": "Indentation",
1874
+ "formula": {
1875
+ "type": "value",
1876
+ "value": 0
1877
+ },
1878
+ "description": "The number of spaces used for indentation in the JSON string",
1879
+ "type": {
1880
+ "type": "Number"
1881
+ }
1882
+ }
1883
+ ],
1884
+ "output": {
1885
+ "description": "The JSON string",
1886
+ "type": {
1887
+ "type": "String"
1888
+ }
1889
+ }
1890
+ },
1891
+ "@toddle/lessOrEqual": {
1892
+ "name": "Less or equal",
1893
+ "description": "Returns True if the First number is smaller than or equal to the Second",
1894
+ "arguments": [
1895
+ {
1896
+ "name": "First",
1897
+ "formula": {
1898
+ "type": "value",
1899
+ "value": ""
1900
+ },
1901
+ "description": "First value to be compared",
1902
+ "type": {
1903
+ "type": "Number"
1904
+ }
1905
+ },
1906
+ {
1907
+ "name": "Second",
1908
+ "formula": {
1909
+ "type": "value",
1910
+ "value": ""
1911
+ },
1912
+ "description": "Second value to be compared",
1913
+ "type": {
1914
+ "type": "Number"
1915
+ }
1916
+ }
1917
+ ],
1918
+ "output": {
1919
+ "description": "Returns True if the First number is smaller than or equal to the Second",
1920
+ "type": {
1921
+ "type": "Number"
1922
+ }
1923
+ }
1924
+ },
1925
+ "@toddle/now": {
1926
+ "name": "Now",
1927
+ "description": "Get a Date representing \"now\"",
1928
+ "arguments": [],
1929
+ "cache": false,
1930
+ "output": {
1931
+ "description": "A Date object initialised at the current date/time",
1932
+ "type": {
1933
+ "type": "Date"
1934
+ }
1935
+ }
1936
+ },
1937
+ "@toddle/squareRoot": {
1938
+ "name": "Square root",
1939
+ "description": "Get the square root of a number",
1940
+ "arguments": [
1941
+ {
1942
+ "name": "Number",
1943
+ "formula": {
1944
+ "type": "value",
1945
+ "value": 1
1946
+ },
1947
+ "description": "Get input number",
1948
+ "type": {
1949
+ "type": "Number"
1950
+ }
1951
+ }
1952
+ ],
1953
+ "output": {
1954
+ "description": "The square root of the input number",
1955
+ "type": {
1956
+ "type": "Number"
1957
+ }
1958
+ }
1959
+ },
1960
+ "@toddle/take": {
1961
+ "name": "Take",
1962
+ "description": "Take items from the start of an array or string.",
1963
+ "arguments": [
1964
+ {
1965
+ "name": "Array",
1966
+ "formula": {
1967
+ "type": "value",
1968
+ "value": null
1969
+ },
1970
+ "description": "Input array or string",
1971
+ "type": {
1972
+ "type": "Union",
1973
+ "types": [
1974
+ {
1975
+ "type": "String"
1976
+ },
1977
+ {
1978
+ "type": "Array"
1979
+ }
1980
+ ]
1981
+ }
1982
+ },
1983
+ {
1984
+ "name": "Count",
1985
+ "formula": {
1986
+ "type": "value",
1987
+ "value": 1
1988
+ },
1989
+ "type": {
1990
+ "type": "Number"
1991
+ },
1992
+ "description": "Number of items to take"
1993
+ }
1994
+ ],
1995
+ "output": {
1996
+ "description": "The first items from the array or string",
1997
+ "type": {
1998
+ "type": "Union",
1999
+ "types": [
2000
+ {
2001
+ "type": "String"
2002
+ },
2003
+ {
2004
+ "type": "Array"
2005
+ }
2006
+ ]
2007
+ }
2008
+ }
2009
+ },
2010
+ "@toddle/append": {
2011
+ "name": "Append",
2012
+ "arguments": [
2013
+ {
2014
+ "name": "Array",
2015
+ "type": {
2016
+ "type": "Array"
2017
+ },
2018
+ "description": "The array to append to",
2019
+ "formula": {
2020
+ "type": "array",
2021
+ "arguments": []
2022
+ }
2023
+ },
2024
+ {
2025
+ "name": "Item",
2026
+ "type": {
2027
+ "type": "Any"
2028
+ },
2029
+ "description": "The item to append to the array",
2030
+ "formula": {
2031
+ "type": "value",
2032
+ "value": "Item"
2033
+ }
2034
+ }
2035
+ ],
2036
+ "description": "Add an element to the end of an array",
2037
+ "output": {
2038
+ "description": "A new array containing all the elements from the input array and the new item ",
2039
+ "type": {
2040
+ "type": "Array"
2041
+ }
2042
+ }
2043
+ },
2044
+ "@toddle/getFromLocalStorage": {
2045
+ "name": "Get from Local Storage",
2046
+ "description": "Read a value from Local Storage with the provided key. It tries to JSON decode the value",
2047
+ "cache": false,
2048
+ "arguments": [
2049
+ {
2050
+ "name": "Key",
2051
+ "formula": {
2052
+ "type": "value",
2053
+ "value": null
2054
+ },
2055
+ "description": "The key to read from Local Storage",
2056
+ "type": {
2057
+ "type": "String"
2058
+ }
2059
+ }
2060
+ ],
2061
+ "output": {
2062
+ "description": "The value found in Local Storage",
2063
+ "type": {
2064
+ "type": "Any"
2065
+ }
2066
+ }
2067
+ },
2068
+ "@toddle/number": {
2069
+ "name": "Number",
2070
+ "arguments": [
2071
+ {
2072
+ "name": "Input",
2073
+ "description": "Value of any type",
2074
+ "type": {
2075
+ "type": "Any"
2076
+ },
2077
+ "formula": {
2078
+ "type": "value",
2079
+ "value": "1"
2080
+ }
2081
+ }
2082
+ ],
2083
+ "description": "Convert a value of any type to a Number.",
2084
+ "output": {
2085
+ "description": "The input value converted to a Number",
2086
+ "type": {
2087
+ "type": "Number"
2088
+ }
2089
+ }
2090
+ },
2091
+ "@toddle/encodeBase64": {
2092
+ "name": "Encode to base64",
2093
+ "arguments": [
2094
+ {
2095
+ "name": "Value",
2096
+ "formula": {
2097
+ "type": "value",
2098
+ "value": "Input value"
2099
+ },
2100
+ "type": {
2101
+ "type": "String"
2102
+ },
2103
+ "description": "The input string to be encoded"
2104
+ }
2105
+ ],
2106
+ "description": "Encode a string to base64",
2107
+ "output": {
2108
+ "description": "The base 64 encoded string",
2109
+ "type": {
2110
+ "type": "String"
2111
+ }
2112
+ }
2113
+ },
2114
+ "@toddle/join": {
2115
+ "name": "Join",
2116
+ "description": "Combine an array of strings in to a single string",
2117
+ "arguments": [
2118
+ {
2119
+ "name": "Array",
2120
+ "formula": {
2121
+ "type": "value",
2122
+ "value": null
2123
+ },
2124
+ "description": "An array of strings",
2125
+ "type": {
2126
+ "type": "Array"
2127
+ }
2128
+ },
2129
+ {
2130
+ "name": "Separator",
2131
+ "formula": {
2132
+ "type": "value",
2133
+ "value": ", "
2134
+ },
2135
+ "description": "A saparator that is inserted in between each item in the retuned string",
2136
+ "type": {
2137
+ "type": "String"
2138
+ }
2139
+ }
2140
+ ],
2141
+ "output": {
2142
+ "description": "A string combining each item in the input array separated by the separator string.",
2143
+ "type": {
2144
+ "type": "String"
2145
+ }
2146
+ }
2147
+ },
2148
+ "@toddle/range": {
2149
+ "name": "Range",
2150
+ "description": "Create an array of numbers between Min and Max",
2151
+ "arguments": [
2152
+ {
2153
+ "formula": {
2154
+ "type": "value",
2155
+ "value": 0
2156
+ },
2157
+ "name": "Min",
2158
+ "description": "The smallest value in the list",
2159
+ "type": {
2160
+ "type": "Number"
2161
+ }
2162
+ },
2163
+ {
2164
+ "name": "Max",
2165
+ "formula": {
2166
+ "type": "value",
2167
+ "value": 10
2168
+ },
2169
+ "description": "The largest value in the list",
2170
+ "type": {
2171
+ "type": "Number"
2172
+ }
2173
+ }
2174
+ ],
2175
+ "output": {
2176
+ "description": "An array containing all the numbers between Min and Max, both inclusive",
2177
+ "type": {
2178
+ "type": "Array"
2179
+ }
2180
+ }
2181
+ },
2182
+ "@toddle/max": {
2183
+ "name": "Max",
2184
+ "description": "Find the largest number",
2185
+ "arguments": [
2186
+ {
2187
+ "name": "0",
2188
+ "formula": {
2189
+ "type": "value",
2190
+ "value": null
2191
+ },
2192
+ "description": "Input number",
2193
+ "type": {
2194
+ "type": "Number"
2195
+ }
2196
+ },
2197
+ {
2198
+ "name": "1",
2199
+ "formula": {
2200
+ "type": "value",
2201
+ "value": null
2202
+ },
2203
+ "description": "Input number",
2204
+ "type": {
2205
+ "type": "Number"
2206
+ }
2207
+ }
2208
+ ],
2209
+ "variableArguments": true,
2210
+ "output": {
2211
+ "description": "The largest of all the input numbers",
2212
+ "type": {
2213
+ "type": "Number"
2214
+ }
2215
+ }
2216
+ },
2217
+ "@toddle/lessThan": {
2218
+ "name": "Less than",
2219
+ "description": "Returns True if the First number is smaller than the Second",
2220
+ "arguments": [
2221
+ {
2222
+ "name": "First",
2223
+ "formula": {
2224
+ "type": "value",
2225
+ "value": ""
2226
+ },
2227
+ "description": "First value to be compared",
2228
+ "type": {
2229
+ "type": "Number"
2230
+ }
2231
+ },
2232
+ {
2233
+ "name": "Second",
2234
+ "formula": {
2235
+ "type": "value",
2236
+ "value": ""
2237
+ },
2238
+ "description": "Second value to be compared",
2239
+ "type": {
2240
+ "type": "Number"
2241
+ }
2242
+ }
2243
+ ],
2244
+ "output": {
2245
+ "description": "Returns True if the First number is smaller than the Second",
2246
+ "type": {
2247
+ "type": "Number"
2248
+ }
2249
+ }
2250
+ },
2251
+ "@toddle/shuffle": {
2252
+ "name": "Shuffle",
2253
+ "description": "Shuffles the items in an Array or String",
2254
+ "cache": false,
2255
+ "arguments": [
2256
+ {
2257
+ "name": "Array",
2258
+ "formula": {
2259
+ "type": "value",
2260
+ "value": null
2261
+ },
2262
+ "description": "Input array or string",
2263
+ "type": {
2264
+ "type": "Union",
2265
+ "types": [
2266
+ {
2267
+ "type": "String"
2268
+ },
2269
+ {
2270
+ "type": "Array"
2271
+ }
2272
+ ]
2273
+ }
2274
+ }
2275
+ ],
2276
+ "output": {
2277
+ "description": "The elements in the Array/String shuffled",
2278
+ "type": {
2279
+ "type": "Union",
2280
+ "types": [
2281
+ {
2282
+ "type": "String"
2283
+ },
2284
+ {
2285
+ "type": "Array"
2286
+ }
2287
+ ]
2288
+ }
2289
+ }
2290
+ },
2291
+ "@toddle/lastIndexOf": {
2292
+ "name": "Last Index of",
2293
+ "description": "Find the last index of a specific item in an array or string",
2294
+ "arguments": [
2295
+ {
2296
+ "name": "Array",
2297
+ "formula": {
2298
+ "type": "value",
2299
+ "value": ""
2300
+ },
2301
+ "description": "The array or string to search",
2302
+ "type": {
2303
+ "type": "Union",
2304
+ "types": [
2305
+ {
2306
+ "type": "String"
2307
+ },
2308
+ {
2309
+ "type": "Array"
2310
+ }
2311
+ ]
2312
+ }
2313
+ },
2314
+ {
2315
+ "name": "Item",
2316
+ "formula": {
2317
+ "type": "value",
2318
+ "value": ""
2319
+ },
2320
+ "description": "The items to search for",
2321
+ "type": {
2322
+ "type": "Any"
2323
+ }
2324
+ }
2325
+ ],
2326
+ "output": {
2327
+ "description": "If the item exists in the array then the last index of that item is returned. If the item is not found -1 is returned",
2328
+ "type": {
2329
+ "type": "Boolean"
2330
+ }
2331
+ }
2332
+ },
2333
+ "@toddle/power": {
2334
+ "name": "Power",
2335
+ "description": "Raise a number to a power",
2336
+ "arguments": [
2337
+ {
2338
+ "name": "Base",
2339
+ "formula": {
2340
+ "type": "value",
2341
+ "value": 3
2342
+ },
2343
+ "description": "The number to be raised to the exponent",
2344
+ "type": {
2345
+ "type": "Number"
2346
+ }
2347
+ },
2348
+ {
2349
+ "name": "Exponent",
2350
+ "formula": {
2351
+ "type": "value",
2352
+ "value": 2
2353
+ },
2354
+ "description": "The exponent to raise the base to",
2355
+ "type": {
2356
+ "type": "Number"
2357
+ }
2358
+ }
2359
+ ],
2360
+ "output": {
2361
+ "type": {
2362
+ "type": "Number"
2363
+ },
2364
+ "description": "The result of raising the base to the exponent"
2365
+ }
2366
+ },
2367
+ "@toddle/roundDown": {
2368
+ "name": "Round down",
2369
+ "description": "Round down to the nearest decimal point",
2370
+ "arguments": [
2371
+ {
2372
+ "name": "Input",
2373
+ "description": "Number to round down",
2374
+ "type": {
2375
+ "type": "Number"
2376
+ },
2377
+ "formula": {
2378
+ "type": "value",
2379
+ "value": 1
2380
+ }
2381
+ },
2382
+ {
2383
+ "name": "Decimals",
2384
+ "description": "Number of decimals to round to",
2385
+ "type": {
2386
+ "type": "Number"
2387
+ },
2388
+ "formula": {
2389
+ "type": "value",
2390
+ "value": 0
2391
+ }
2392
+ }
2393
+ ],
2394
+ "output": {
2395
+ "type": {
2396
+ "type": "Number"
2397
+ },
2398
+ "description": "Rounded number"
2399
+ }
2400
+ },
2401
+ "@toddle/every": {
2402
+ "name": "Every",
2403
+ "description": "Returns TRUE if the Predicate formula returns true for all items in the array.",
2404
+ "arguments": [
2405
+ {
2406
+ "name": "Array",
2407
+ "formula": {
2408
+ "type": "value",
2409
+ "value": null
2410
+ },
2411
+ "description": "The array of items to evaluate",
2412
+ "type": {
2413
+ "type": "Array"
2414
+ }
2415
+ },
2416
+ {
2417
+ "name": "Formula",
2418
+ "isFunction": true,
2419
+ "formula": {
2420
+ "type": "path",
2421
+ "path": [
2422
+ "Args",
2423
+ "item"
2424
+ ]
2425
+ },
2426
+ "description": "Predicate formula for evaluating each item",
2427
+ "type": {
2428
+ "type": "Formula"
2429
+ }
2430
+ }
2431
+ ],
2432
+ "output": {
2433
+ "description": "TRUE if the Predicate formula returns true for all items in the array, otherwise FALSE",
2434
+ "type": {
2435
+ "type": "Array"
2436
+ }
2437
+ }
2438
+ },
2439
+ "@toddle/keyBy": {
2440
+ "name": "Key by",
2441
+ "description": "Organize an array of items into an Object based on the Key formula",
2442
+ "arguments": [
2443
+ {
2444
+ "name": "Array",
2445
+ "formula": {
2446
+ "type": "value",
2447
+ "value": null
2448
+ },
2449
+ "description": "Array of items to be Organized",
2450
+ "type": {
2451
+ "type": "Array"
2452
+ }
2453
+ },
2454
+ {
2455
+ "name": "Formula",
2456
+ "isFunction": true,
2457
+ "formula": {
2458
+ "type": "value",
2459
+ "value": null
2460
+ },
2461
+ "description": "The key formula used to index the items. The String returned from the formula will match the key in the output object",
2462
+ "type": {
2463
+ "type": "Formula"
2464
+ }
2465
+ }
2466
+ ],
2467
+ "output": {
2468
+ "description": "An object where each key matches a value returned by the key formula and each value is the item that string was returned for",
2469
+ "type": {
2470
+ "type": "Object"
2471
+ }
2472
+ }
2473
+ },
2474
+ "@toddle/parseJSON": {
2475
+ "name": "Parse JSON",
2476
+ "description": "Parse a string to JSON",
2477
+ "arguments": [
2478
+ {
2479
+ "name": "JSON string",
2480
+ "formula": {
2481
+ "type": "value",
2482
+ "value": null
2483
+ },
2484
+ "description": "The JSON string to be parsed",
2485
+ "type": {
2486
+ "type": "String"
2487
+ }
2488
+ }
2489
+ ],
2490
+ "output": {
2491
+ "description": "The parsed JSON value. If the input is not a valid JSON string, null is returned.",
2492
+ "type": {
2493
+ "type": "Any"
2494
+ }
2495
+ }
2496
+ },
2497
+ "@toddle/formatDate": {
2498
+ "name": "Format Date",
2499
+ "arguments": [
2500
+ {
2501
+ "name": "Date",
2502
+ "description": "Date to format",
2503
+ "type": {
2504
+ "type": "Date"
2505
+ },
2506
+ "formula": {
2507
+ "type": "Date",
2508
+ "value": null
2509
+ }
2510
+ },
2511
+ {
2512
+ "name": "Locale(s)",
2513
+ "description": "Optional locale to use for formatting the Date - \"en\" or \"fr\" for instance. Multiple locales can be provided (as an Array of Strings) to provide a fallback locale. It defaults to the runtime's locale.",
2514
+ "type": {
2515
+ "type": "String | Array"
2516
+ },
2517
+ "formula": {
2518
+ "type": "value",
2519
+ "value": null
2520
+ }
2521
+ },
2522
+ {
2523
+ "name": "Options",
2524
+ "description": "Optional object for configuring formatting. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#syntax for all options",
2525
+ "type": {
2526
+ "type": "Object"
2527
+ },
2528
+ "formula": {
2529
+ "type": "value",
2530
+ "value": null
2531
+ }
2532
+ }
2533
+ ],
2534
+ "description": "Format a date using the Intl.DateTimeFormat API. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat for more information.",
2535
+ "output": {
2536
+ "description": "The Date input formatted as a string",
2537
+ "type": {
2538
+ "type": "String"
2539
+ }
2540
+ }
2541
+ },
2542
+ "@toddle/matches": {
2543
+ "name": "Matches",
2544
+ "description": "Finds the (global) matches in a string based on a regular expression",
2545
+ "arguments": [
2546
+ {
2547
+ "name": "Input",
2548
+ "formula": {
2549
+ "type": "value",
2550
+ "value": ""
2551
+ },
2552
+ "description": "The string to search for matches in",
2553
+ "type": {
2554
+ "type": "String"
2555
+ }
2556
+ },
2557
+ {
2558
+ "name": "Regular expression",
2559
+ "formula": {
2560
+ "type": "value",
2561
+ "value": ""
2562
+ },
2563
+ "description": "The regular expression to use for matching",
2564
+ "type": {
2565
+ "type": "String"
2566
+ }
2567
+ },
2568
+ {
2569
+ "name": "Global search",
2570
+ "formula": {
2571
+ "type": "value",
2572
+ "value": true
2573
+ },
2574
+ "description": "Test the regular expression against all possible matches in a string",
2575
+ "type": {
2576
+ "type": "Boolean"
2577
+ }
2578
+ },
2579
+ {
2580
+ "name": "Case insensitive",
2581
+ "formula": {
2582
+ "type": "value",
2583
+ "value": false
2584
+ },
2585
+ "description": "Ignore case while attempting a match in a string",
2586
+ "type": {
2587
+ "type": "Boolean"
2588
+ }
2589
+ },
2590
+ {
2591
+ "name": "Multi line",
2592
+ "formula": {
2593
+ "type": "value",
2594
+ "value": false
2595
+ },
2596
+ "description": "Treat multiline strings as multiple lines",
2597
+ "type": {
2598
+ "type": "Boolean"
2599
+ }
2600
+ }
2601
+ ],
2602
+ "output": {
2603
+ "description": "A list of strings",
2604
+ "type": {
2605
+ "type": "List"
2606
+ }
2607
+ }
2608
+ },
2609
+ "@toddle/sum": {
2610
+ "name": "Sum",
2611
+ "arguments": [
2612
+ {
2613
+ "name": "Array",
2614
+ "type": {
2615
+ "type": "Array"
2616
+ },
2617
+ "description": "The array of numbers to sum",
2618
+ "formula": {
2619
+ "type": "array",
2620
+ "arguments": []
2621
+ }
2622
+ }
2623
+ ],
2624
+ "description": "Return the sum of an array of numbers",
2625
+ "output": {
2626
+ "description": "The total sum from adding all the numbers in the array",
2627
+ "type": {
2628
+ "type": "Number"
2629
+ }
2630
+ }
2631
+ },
2632
+ "@toddle/startsWith": {
2633
+ "name": "Starts with",
2634
+ "description": "Check if a string has a given prefix",
2635
+ "arguments": [
2636
+ {
2637
+ "name": "String",
2638
+ "formula": {
2639
+ "type": "value",
2640
+ "value": ""
2641
+ },
2642
+ "description": "The string to check",
2643
+ "type": {
2644
+ "type": "String"
2645
+ }
2646
+ },
2647
+ {
2648
+ "name": "Prefix",
2649
+ "formula": {
2650
+ "type": "value",
2651
+ "value": ""
2652
+ },
2653
+ "description": "The prefix to check for",
2654
+ "type": {
2655
+ "type": "String"
2656
+ }
2657
+ }
2658
+ ],
2659
+ "output": {
2660
+ "description": "True if the Input string starts with the Prefix, otherwise False",
2661
+ "type": {
2662
+ "type": "Boolean"
2663
+ }
2664
+ }
2665
+ },
2666
+ "@toddle/dateFromTimestamp": {
2667
+ "name": "Date From Timestamp",
2668
+ "arguments": [
2669
+ {
2670
+ "name": "Timestamp",
2671
+ "description": "Number in milliseconds since 1st January, 1970 (EPOCH)",
2672
+ "type": {
2673
+ "type": "Number"
2674
+ },
2675
+ "formula": {
2676
+ "type": "value",
2677
+ "value": 1687787245933
2678
+ }
2679
+ }
2680
+ ],
2681
+ "description": "Convert a timestamp (milliseconds) to a Date",
2682
+ "output": {
2683
+ "description": "The input value converted to a Date",
2684
+ "type": {
2685
+ "type": "Date"
2686
+ }
2687
+ }
2688
+ },
2689
+ "@toddle/languages": {
2690
+ "name": "Languages",
2691
+ "description": "An array of the preferred languages for the user, based on the Navigator.languages property (on the client) or the Accept-Language header (on the server).",
2692
+ "arguments": [],
2693
+ "output": {
2694
+ "description": "An array with the preferred languages for the user.",
2695
+ "type": {
2696
+ "type": "Array"
2697
+ }
2698
+ }
2699
+ },
2700
+ "@toddle/split": {
2701
+ "name": "Split",
2702
+ "description": "Split a string into an array of smaller strings each time the Delimiter occurs. The Delimiter will not be part of the output",
2703
+ "arguments": [
2704
+ {
2705
+ "name": "Input",
2706
+ "formula": {
2707
+ "type": "value",
2708
+ "value": ""
2709
+ },
2710
+ "description": "The string to split",
2711
+ "type": {
2712
+ "type": "String"
2713
+ }
2714
+ },
2715
+ {
2716
+ "name": "Delimiter",
2717
+ "formula": {
2718
+ "type": "value",
2719
+ "value": ""
2720
+ },
2721
+ "description": "The string to split by",
2722
+ "type": {
2723
+ "type": "String"
2724
+ }
2725
+ }
2726
+ ],
2727
+ "output": {
2728
+ "description": "An array of strings",
2729
+ "type": {
2730
+ "type": "Array",
2731
+ "ofType": {
2732
+ "type": "String"
2733
+ }
2734
+ }
2735
+ }
2736
+ },
2737
+ "@toddle/size": {
2738
+ "name": "Size",
2739
+ "description": "Get the size of a collection",
2740
+ "arguments": [
2741
+ {
2742
+ "name": "Collection",
2743
+ "formula": {
2744
+ "type": "value",
2745
+ "value": [
2746
+ 1,
2747
+ 2,
2748
+ 3
2749
+ ]
2750
+ },
2751
+ "description": "The array, object or string to get the size of",
2752
+ "type": {
2753
+ "type": "Union",
2754
+ "types": [
2755
+ {
2756
+ "type": "String"
2757
+ },
2758
+ {
2759
+ "type": "Array"
2760
+ },
2761
+ {
2762
+ "type": "Object"
2763
+ }
2764
+ ]
2765
+ }
2766
+ }
2767
+ ],
2768
+ "output": {
2769
+ "description": "The size of the collection",
2770
+ "type": {
2771
+ "type": "Number"
2772
+ }
2773
+ }
2774
+ },
2775
+ "@toddle/logarithm": {
2776
+ "name": "Logarithm",
2777
+ "description": "Return the logarithm of a number",
2778
+ "arguments": [
2779
+ {
2780
+ "name": "Number",
2781
+ "formula": {
2782
+ "type": "value",
2783
+ "value": 1
2784
+ },
2785
+ "description": "A number greater than or equal to 0",
2786
+ "type": {
2787
+ "type": "Number"
2788
+ }
2789
+ }
2790
+ ],
2791
+ "output": {
2792
+ "type": {
2793
+ "type": "Number"
2794
+ },
2795
+ "description": "The natural logarithm of the number"
2796
+ }
2797
+ },
2798
+ "@toddle/isServer": {
2799
+ "name": "Is Server",
2800
+ "description": "Returns a boolean indicating whether formulas are currently evaluated server-side or client-side.",
2801
+ "arguments": [],
2802
+ "output": {
2803
+ "description": "A boolean indicating whether formulas are currently evaluated server-side or client-side.",
2804
+ "type": {
2805
+ "type": "Boolean"
2806
+ }
2807
+ }
2808
+ },
2809
+ "@toddle/getCookie": {
2810
+ "name": "Get Cookie",
2811
+ "description": "Get the value of a cookie by name. This formula is available both server-side and client-side. Some cookies will only be available server-side in case they are http-only cookies.",
2812
+ "arguments": [
2813
+ {
2814
+ "name": "Cookie name",
2815
+ "formula": {
2816
+ "type": "value",
2817
+ "value": null
2818
+ },
2819
+ "description": "The name of the cookie you want to get the value of.",
2820
+ "type": {
2821
+ "type": "String"
2822
+ }
2823
+ }
2824
+ ],
2825
+ "output": {
2826
+ "description": "The value of the cookie if found or null if not found.",
2827
+ "type": {
2828
+ "type": "String"
2829
+ }
2830
+ }
2831
+ },
2832
+ "@toddle/boolean": {
2833
+ "name": "Boolean",
2834
+ "arguments": [
2835
+ {
2836
+ "name": "Input",
2837
+ "description": "Value of any type",
2838
+ "type": {
2839
+ "type": "Any"
2840
+ },
2841
+ "formula": {
2842
+ "type": "value",
2843
+ "value": "1"
2844
+ }
2845
+ }
2846
+ ],
2847
+ "description": "Convert a value of any type to a Boolean.\nFalse and Null will return False, all other values will return True",
2848
+ "output": {
2849
+ "description": "The input value converted to a Boolean",
2850
+ "type": {
2851
+ "type": "Boolean"
2852
+ }
2853
+ }
2854
+ },
2855
+ "@toddle/indexOf": {
2856
+ "name": "Index of",
2857
+ "description": "Find the index of a specific item in an array or string",
2858
+ "arguments": [
2859
+ {
2860
+ "name": "Array",
2861
+ "formula": {
2862
+ "type": "value",
2863
+ "value": ""
2864
+ },
2865
+ "description": "The array or string to search",
2866
+ "type": {
2867
+ "type": "Union",
2868
+ "types": [
2869
+ {
2870
+ "type": "String"
2871
+ },
2872
+ {
2873
+ "type": "Array"
2874
+ }
2875
+ ]
2876
+ }
2877
+ },
2878
+ {
2879
+ "name": "Item",
2880
+ "formula": {
2881
+ "type": "value",
2882
+ "value": ""
2883
+ },
2884
+ "description": "The items to search for",
2885
+ "type": {
2886
+ "type": "Any"
2887
+ }
2888
+ }
2889
+ ],
2890
+ "output": {
2891
+ "description": "If the item exists in the array then the index of that item is returned. If the item is not found -1 is returned",
2892
+ "type": {
2893
+ "type": "Boolean"
2894
+ }
2895
+ }
2896
+ },
2897
+ "@toddle/capitalize": {
2898
+ "name": "Capitalize",
2899
+ "description": "Capitalize a string, making the first letter uppercase and the rest lowercase.",
2900
+ "arguments": [
2901
+ {
2902
+ "name": "String",
2903
+ "formula": {
2904
+ "type": "value",
2905
+ "value": "string"
2906
+ },
2907
+ "description": "Input string",
2908
+ "type": {
2909
+ "type": "String"
2910
+ }
2911
+ }
2912
+ ],
2913
+ "output": {
2914
+ "description": "The capitalized string",
2915
+ "type": {
2916
+ "type": "String"
2917
+ }
2918
+ }
2919
+ },
2920
+ "@toddle/lowercase": {
2921
+ "name": "Lower case",
2922
+ "description": "Convert a string to lowercase",
2923
+ "arguments": [
2924
+ {
2925
+ "name": "String",
2926
+ "formula": {
2927
+ "type": "value",
2928
+ "value": "string"
2929
+ },
2930
+ "description": "Input string",
2931
+ "type": {
2932
+ "type": "String"
2933
+ }
2934
+ }
2935
+ ],
2936
+ "output": {
2937
+ "description": "The input string with all characters converted to lowercase",
2938
+ "type": {
2939
+ "type": "String"
2940
+ }
2941
+ }
2942
+ },
2943
+ "@toddle/getHttpOnlyCookie": {
2944
+ "name": "Get Http-Only Cookie",
2945
+ "description": "Get the value of a http-only cookie by name. This formula will only output anything meaningful server-side, and is intended to be used for SSR/proxied API requests to read http-only cookies.",
2946
+ "arguments": [
2947
+ {
2948
+ "name": "Cookie name",
2949
+ "formula": {
2950
+ "type": "value",
2951
+ "value": null
2952
+ },
2953
+ "description": "The name of the http-only cookie you want to get the value of.",
2954
+ "type": {
2955
+ "type": "String"
2956
+ }
2957
+ }
2958
+ ],
2959
+ "output": {
2960
+ "description": "Server-side: the value of the cookie if found or null if not found. Client-side: a placeholder template string.",
2961
+ "type": {
2962
+ "type": "String"
2963
+ }
2964
+ }
2965
+ },
2966
+ "@toddle/formatNumber": {
2967
+ "name": "Format Number",
2968
+ "arguments": [
2969
+ {
2970
+ "name": "Input",
2971
+ "description": "Number to format",
2972
+ "type": {
2973
+ "type": "Number"
2974
+ },
2975
+ "formula": {
2976
+ "type": "Number",
2977
+ "value": 100
2978
+ }
2979
+ },
2980
+ {
2981
+ "name": "Locale(s)",
2982
+ "description": "Optional locale to use for formatting the Number - \"en\" or \"fr\" for instance. Multiple locales can be provided (as an Array of Strings) to provide a fallback locale. It defaults to the runtime's locale.",
2983
+ "type": {
2984
+ "type": "String | Array"
2985
+ },
2986
+ "formula": {
2987
+ "type": "value",
2988
+ "value": null
2989
+ }
2990
+ },
2991
+ {
2992
+ "name": "Options",
2993
+ "description": "Optional object for configuring formatting. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locale_options for all options",
2994
+ "type": {
2995
+ "type": "Object"
2996
+ },
2997
+ "formula": {
2998
+ "type": "value",
2999
+ "value": null
3000
+ }
3001
+ }
3002
+ ],
3003
+ "description": "Format a date using the Intl.NumberFormat API. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat for more information.",
3004
+ "output": {
3005
+ "description": "The Number input formatted as a string",
3006
+ "type": {
3007
+ "type": "String"
3008
+ }
3009
+ }
3010
+ },
3011
+ "@toddle/add": {
3012
+ "name": "Add",
3013
+ "arguments": [
3014
+ {
3015
+ "name": "0",
3016
+ "description": "Number to be added",
3017
+ "type": {
3018
+ "type": "Number"
3019
+ },
3020
+ "formula": {
3021
+ "type": "value",
3022
+ "value": 1
3023
+ }
3024
+ },
3025
+ {
3026
+ "name": "1",
3027
+ "type": {
3028
+ "type": "Number"
3029
+ },
3030
+ "description": "Number to be added",
3031
+ "formula": {
3032
+ "type": "value",
3033
+ "value": 1
3034
+ }
3035
+ }
3036
+ ],
3037
+ "variableArguments": true,
3038
+ "description": "Get the sum of multiple numbers",
3039
+ "output": {
3040
+ "description": "The sum of all the input numbers",
3041
+ "type": {
3042
+ "type": "Number"
3043
+ }
3044
+ }
3045
+ },
3046
+ "@toddle/greaterOrEqueal": {
3047
+ "name": "Greater or equal",
3048
+ "description": "Returns TRUE if the First number is larger than or equal to the second",
3049
+ "arguments": [
3050
+ {
3051
+ "name": "First",
3052
+ "formula": {
3053
+ "type": "value",
3054
+ "value": ""
3055
+ },
3056
+ "description": "First value to be compared",
3057
+ "type": {
3058
+ "type": "Number"
3059
+ }
3060
+ },
3061
+ {
3062
+ "name": "Second",
3063
+ "formula": {
3064
+ "type": "value",
3065
+ "value": ""
3066
+ },
3067
+ "description": "Second value to be compared",
3068
+ "type": {
3069
+ "type": "Number"
3070
+ }
3071
+ }
3072
+ ],
3073
+ "output": {
3074
+ "description": "Returns TRUE if the First number is larger than or equal to the second",
3075
+ "type": {
3076
+ "type": "Number"
3077
+ }
3078
+ }
3079
+ }
3080
+ };
3081
+ export const actions = {
3082
+ "@toddle/sleep": {
3083
+ "name": "Sleep",
3084
+ "description": "Run an action after a delay",
3085
+ "arguments": [
3086
+ {
3087
+ "name": "Delay in milliseconds",
3088
+ "type": {
3089
+ "type": "Number"
3090
+ },
3091
+ "formula": {
3092
+ "type": "value",
3093
+ "value": 500
3094
+ }
3095
+ }
3096
+ ],
3097
+ "events": {
3098
+ "tick": {
3099
+ "actions": []
3100
+ }
3101
+ }
3102
+ },
3103
+ "@toddle/deleteFromLocalStorage": {
3104
+ "name": "Delete from Local Storage",
3105
+ "description": "Deletes the value from Local Storage (if found) based on the provided key",
3106
+ "arguments": [
3107
+ {
3108
+ "name": "Key",
3109
+ "description": "The key to use when deleting in Local Storage",
3110
+ "formula": {
3111
+ "type": "value",
3112
+ "value": ""
3113
+ }
3114
+ }
3115
+ ]
3116
+ },
3117
+ "@toddle/share": {
3118
+ "name": "Share",
3119
+ "description": "Share data with title, text, and/or url using the Navigator.share API",
3120
+ "arguments": [
3121
+ {
3122
+ "name": "URL to share",
3123
+ "type": {
3124
+ "type": "String"
3125
+ },
3126
+ "formula": {
3127
+ "type": "value",
3128
+ "value": null
3129
+ }
3130
+ },
3131
+ {
3132
+ "name": "Title to share",
3133
+ "type": {
3134
+ "type": "String"
3135
+ },
3136
+ "formula": {
3137
+ "type": "value",
3138
+ "value": null
3139
+ }
3140
+ },
3141
+ {
3142
+ "name": "Text to share",
3143
+ "type": {
3144
+ "type": "String"
3145
+ },
3146
+ "formula": {
3147
+ "type": "value",
3148
+ "value": null
3149
+ }
3150
+ }
3151
+ ]
3152
+ },
3153
+ "@toddle/saveToSessionStorage": {
3154
+ "name": "Save to Session Storage",
3155
+ "description": "Saves the provided key/value to Session Storage by JSON encoding the value",
3156
+ "arguments": [
3157
+ {
3158
+ "name": "Key",
3159
+ "description": "The key to be used in Session Storage",
3160
+ "formula": {
3161
+ "type": "value",
3162
+ "value": ""
3163
+ }
3164
+ },
3165
+ {
3166
+ "name": "Value",
3167
+ "description": "The value that should be saved in Session Storage. This can be anything that is serializable (string, number, boolean, array or object)",
3168
+ "type": {
3169
+ "type": "Any"
3170
+ },
3171
+ "formula": {
3172
+ "type": "value",
3173
+ "value": null
3174
+ }
3175
+ }
3176
+ ]
3177
+ },
3178
+ "@toddle/preventDefault": {
3179
+ "name": "Prevent default",
3180
+ "docs-link": "https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault",
3181
+ "description": "Prevent default browser behavior for this event",
3182
+ "arguments": []
3183
+ },
3184
+ "@toddle/interval": {
3185
+ "name": "Interval",
3186
+ "description": "Run an action every \"delay\" milliseconds",
3187
+ "arguments": [
3188
+ {
3189
+ "name": "Interval in milliseconds",
3190
+ "type": {
3191
+ "type": "Number"
3192
+ },
3193
+ "formula": {
3194
+ "type": "value",
3195
+ "value": 1000
3196
+ }
3197
+ }
3198
+ ],
3199
+ "events": {
3200
+ "tick": {
3201
+ "actions": []
3202
+ }
3203
+ }
3204
+ },
3205
+ "@toddle/clearLocalStorage": {
3206
+ "name": "Clear Local Storage",
3207
+ "description": "Deletes all values in Local Storage",
3208
+ "arguments": []
3209
+ },
3210
+ "@toddle/deleteFromSessionStorage": {
3211
+ "name": "Delete from Session Storage",
3212
+ "description": "Deletes the value from Session Storage (if found) based on the provided key",
3213
+ "arguments": [
3214
+ {
3215
+ "name": "Key",
3216
+ "description": "The key to use when deleting in Session Storage",
3217
+ "formula": {
3218
+ "type": "value",
3219
+ "value": ""
3220
+ }
3221
+ }
3222
+ ]
3223
+ },
3224
+ "@toddle/logToConsole": {
3225
+ "name": "Log to console",
3226
+ "description": "Log a message to the browser console",
3227
+ "arguments": [
3228
+ {
3229
+ "name": "Label",
3230
+ "formula": {
3231
+ "type": "value",
3232
+ "value": ""
3233
+ }
3234
+ },
3235
+ {
3236
+ "name": "Data",
3237
+ "formula": {
3238
+ "type": "value",
3239
+ "value": "<Data>"
3240
+ }
3241
+ }
3242
+ ]
3243
+ },
3244
+ "@toddle/copyToClipboard": {
3245
+ "name": "Copy to clipboard",
3246
+ "arguments": [
3247
+ {
3248
+ "name": "Value",
3249
+ "type": {
3250
+ "type": "String"
3251
+ },
3252
+ "formula": {
3253
+ "type": "value",
3254
+ "value": "<Param Value>"
3255
+ }
3256
+ }
3257
+ ]
3258
+ },
3259
+ "@toddle/setSessionCookies": {
3260
+ "name": "Set session cookies",
3261
+ "description": "Save authentication tokens as session cookies",
3262
+ "arguments": [
3263
+ {
3264
+ "name": "Access token",
3265
+ "description": "Access tokens are the most common way to authenticate with a server",
3266
+ "formula": {
3267
+ "type": "value",
3268
+ "value": ""
3269
+ }
3270
+ },
3271
+ {
3272
+ "name": "Expires in",
3273
+ "description": "(Optional) Seconds till the token expires. Defaults to 3600 (1 hour). This should be left blank for JWTs",
3274
+ "type": {
3275
+ "type": "Number"
3276
+ },
3277
+ "formula": {
3278
+ "type": "value",
3279
+ "value": ""
3280
+ }
3281
+ }
3282
+ ],
3283
+ "events": {
3284
+ "Success": {
3285
+ "description": "This event is triggered once the tokens have been saved.",
3286
+ "actions": []
3287
+ },
3288
+ "Error": {
3289
+ "description": "This event is triggered if toddle is unable to set the session cookies",
3290
+ "actions": []
3291
+ }
3292
+ }
3293
+ },
3294
+ "@toddle/saveToLocalStorage": {
3295
+ "name": "Save to Local Storage",
3296
+ "description": "Saves the provided key/value to Local Storage by JSON encoding the value",
3297
+ "arguments": [
3298
+ {
3299
+ "name": "Key",
3300
+ "description": "The key to be used in Local Storage",
3301
+ "formula": {
3302
+ "type": "value",
3303
+ "value": ""
3304
+ }
3305
+ },
3306
+ {
3307
+ "name": "Value",
3308
+ "description": "The value that should be saved in Local Storage. This can be anything that is serializable (string, number, boolean, array or object)",
3309
+ "type": {
3310
+ "type": "Any"
3311
+ },
3312
+ "formula": {
3313
+ "type": "value",
3314
+ "value": null
3315
+ }
3316
+ }
3317
+ ]
3318
+ },
3319
+ "@toddle/focus": {
3320
+ "name": "Focus",
3321
+ "description": "Move focus to a DOM element",
3322
+ "arguments": [
3323
+ {
3324
+ "name": "Element",
3325
+ "description": "The DOM element that should receive focus",
3326
+ "type": {
3327
+ "type": "Element"
3328
+ },
3329
+ "formula": {
3330
+ "type": "Element",
3331
+ "value": null
3332
+ }
3333
+ }
3334
+ ]
3335
+ },
3336
+ "@toddle/clearSessionStorage": {
3337
+ "name": "Clear Session Storage",
3338
+ "description": "Deletes all values in Session Storage",
3339
+ "arguments": []
3340
+ },
3341
+ "@toddle/gotToURL": {
3342
+ "name": "Go to URL",
3343
+ "description": "Navigate to a different URL",
3344
+ "arguments": [
3345
+ {
3346
+ "name": "URL",
3347
+ "formula": {
3348
+ "type": "value",
3349
+ "value": "https://example.com"
3350
+ }
3351
+ }
3352
+ ]
3353
+ },
3354
+ "@toddle/stopPropagation": {
3355
+ "name": "Stop propagation",
3356
+ "docs-link": "https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation",
3357
+ "description": "Stop the event from bubbling further up to parent elements",
3358
+ "arguments": []
3359
+ }
3360
+ };