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