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