-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataset.jsonl
519 lines (519 loc) · 151 KB
/
dataset.jsonl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
{"prompt":"Fetch data from URL\n\n###\n\n","completion":" GET Request | url,headers,params | data | IMPLICIT | NONE\n({ url, headers, params }, { data }) => {\n return axios\n .get(url, { headers, params })\n .then((res) => data.next(res.data));\n }###"}
{"prompt":"HTTP GET request\n\n###\n\n","completion":" GET Request | url,headers,params | data | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { url, headers, params } = inputData;\n const { data } = outputData;\n\n fetch(url, { headers, params })\n .then((response) => response.json())\n .then((responseData) => data.next(responseData));\n}###"}
{"prompt":"Retrieve data from URL\n\n###\n\n","completion":" GET Request | url,headers,params | data | IMPLICIT | NONE\n({ url, headers, params }, { data }) => {\n return axios\n .get(url, { headers, params })\n .then((res) => data.next(res.data));\n }###"}
{"prompt":"Get data from URL\n\n###\n\n","completion":" GET Request | url,headers,params | data | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { url, headers, params } = inputData;\n const { data } = outputData;\n\n fetch(url, { headers, params })\n .then((response) => response.json())\n .then((responseData) => data.next(responseData));\n}###"}
{"prompt":"Send HTTP POST requests\n\n###\n\n","completion":" POST Request | url,headers,params,data | data | IMPLICIT | NONE\n({ url, headers, params, data: body }, { data }) => {\n const config: AxiosRequestConfig = { headers, params };\n return axios.post(url, body, config).then((res) => data.next(res.data));\n }###"}
{"prompt":"HTTP POST Request\n\n###\n\n","completion":" POST Request | url,headers,params,data | data | IMPLICIT | NONE\nfunction ({ url: endpoint, headers: requestHeaders, params: queryParams, data: body }, { data: response }) {\n const config: AxiosRequestConfig = { headers: requestHeaders, params: queryParams };\n return axios.post(endpoint, body, config).then((res) => response.next(res.data));\n}###"}
{"prompt":"Part that sends data via HTTP POST\n\n###\n\n","completion":" POST Request | url,headers,params,data | data | IMPLICIT | NONE\n({ url, headers, params, data: body }, { data }) => {\n const config: AxiosRequestConfig = { headers, params };\n return axios.post(url, body, config).then((res) => data.next(res.data));\n }###"}
{"prompt":"Send data via HTTP POST\n\n###\n\n","completion":" POST Request | url,headers,params,data | data | IMPLICIT | NONE\nfunction ({ url: endpoint, headers: requestHeaders, params: queryParams, data: body }, { data: response }) {\n const config: AxiosRequestConfig = { headers: requestHeaders, params: queryParams };\n return axios.post(endpoint, body, config).then((res) => response.next(res.data));\n}###"}
{"prompt":"Update data with PUT request\n\n###\n\n","completion":" PUT Request | url,headers,params,data | data | IMPLICIT | NONE\n({ url, headers, params, data: body }, { data }) => {\n const config: AxiosRequestConfig = { headers, params };\n return axios.put(url, body, config).then((res) => data.next(res.data));\n }###"}
{"prompt":"Send PUT request to URL\n\n###\n\n","completion":" PUT Request | url,headers,params,data | data | IMPLICIT | NONE\nfunction ({ url: endpoint, headers: requestHeaders, params: queryParams, data: body }, { data: result }, adv) {\n const config: AxiosRequestConfig = { headers: requestHeaders, params: queryParams };\n return axios.put(endpoint, body, config).then((res) => result.next(res.data));\n }###"}
{"prompt":"Update data using PUT method\n\n###\n\n","completion":" PUT Request | url,headers,params,data | data | IMPLICIT | NONE\n({ url, headers, params, data: body }, { data }) => {\n const config: AxiosRequestConfig = { headers, params };\n return axios.put(url, body, config).then((res) => data.next(res.data));\n }###"}
{"prompt":"Update data with PUT method to specified URL\n\n###\n\n","completion":" PUT Request | url,headers,params,data | data | IMPLICIT | NONE\nfunction ({ url: endpoint, headers: requestHeaders, params: queryParams, data: body }, { data: result }, adv) {\n const config: AxiosRequestConfig = { headers: requestHeaders, params: queryParams };\n return axios.put(endpoint, body, config).then((res) => result.next(res.data));\n }###"}
{"prompt":"HTTP Request Sender\n\n###\n\n","completion":" Request | url,method,headers,params,data | data | IMPLICIT | NONE\n({ url, method, headers, params, data: body }, { data }) => {\n const config: AxiosRequestConfig = { method, headers, params };\n return axios\n .request({ url, data: body, ...config })\n .then((res) => data.next(res.data));\n }###"}
{"prompt":"Send HTTP Request\n\n###\n\n","completion":" Request | url,method,headers,params,data | data | IMPLICIT | NONE\nfunction (request, response, state) {\n const { url, method, headers, params, data: body } = request;\n const { data } = response;\n\n const config: AxiosRequestConfig = { method, headers, params };\n return axios\n .request({ url, data: body, ...config })\n .then((res) => data.next(res.data));\n}###"}
{"prompt":"HTTP Request with Axios\n\n###\n\n","completion":" Request | url,method,headers,params,data | data | IMPLICIT | NONE\n({ url, method, headers, params, data: body }, { data }) => {\n const config: AxiosRequestConfig = { method, headers, params };\n return axios\n .request({ url, data: body, ...config })\n .then((res) => data.next(res.data));\n }###"}
{"prompt":"Send HTTP Request with Axios\n\n###\n\n","completion":" Request | url,method,headers,params,data | data | IMPLICIT | NONE\nfunction (request, response, state) {\n const { url, method, headers, params, data: body } = request;\n const { data } = response;\n\n const config: AxiosRequestConfig = { method, headers, params };\n return axios\n .request({ url, data: body, ...config })\n .then((res) => data.next(res.data));\n}###"}
{"prompt":"Convert object to JSON string\n\n###\n\n","completion":" JSON Stringify | object | json | IMPLICIT | NONE\n({ object }, { json }) => json.next(JSON.stringify(object))###"}
{"prompt":"Create JSON string from object\n\n###\n\n","completion":" JSON Stringify | object | json | IMPLICIT | NONE\nfunction ({ inputObject }, { outputJSON }) {\n const jsonString = JSON.stringify(inputObject);\n outputJSON.next(jsonString);\n}###"}
{"prompt":"JSON stringifier\n\n###\n\n","completion":" JSON Stringify | object | json | IMPLICIT | NONE\n({ object }, { json }) => json.next(JSON.stringify(object))###"}
{"prompt":"Object to JSON converter\n\n###\n\n","completion":" JSON Stringify | object | json | IMPLICIT | NONE\nfunction ({ inputObject }, { outputJSON }) {\n const jsonString = JSON.stringify(inputObject);\n outputJSON.next(jsonString);\n}###"}
{"prompt":"Extract object keys\n\n###\n\n","completion":" Keys | object | keys | IMPLICIT | NONE\n({ object }, { keys }) => keys.next(Object.keys(object))###"}
{"prompt":"Get keys from object\n\n###\n\n","completion":" Keys | object | keys | IMPLICIT | NONE\nfunction (inputObj, outputKeys) {\n const { object } = inputObj;\n const { keys } = outputKeys;\n const objectKeys = Object.keys(object);\n keys.next(objectKeys);\n}###"}
{"prompt":"List object keys\n\n###\n\n","completion":" Keys | object | keys | IMPLICIT | NONE\n({ object }, { keys }) => keys.next(Object.keys(object))###"}
{"prompt":"Retrieve keys from object\n\n###\n\n","completion":" Keys | object | keys | IMPLICIT | NONE\nfunction (inputObj, outputKeys) {\n const { object } = inputObj;\n const { keys } = outputKeys;\n const objectKeys = Object.keys(object);\n keys.next(objectKeys);\n}###"}
{"prompt":"Extract values from object\n\n###\n\n","completion":" Values | object | values | IMPLICIT | NONE\n({ object }, { values }) => values.next(Object.values(object))###"}
{"prompt":"Get values from object\n\n###\n\n","completion":" Values | object | values | IMPLICIT | NONE\nfunction (inputObj, outputValues) {\n const { input } = inputObj;\n const { output } = outputValues;\n const valuesArr = Object.values(input);\n output.next(valuesArr);\n}###"}
{"prompt":"Extract object values\n\n###\n\n","completion":" Values | object | values | IMPLICIT | NONE\n({ object }, { values }) => values.next(Object.values(object))###"}
{"prompt":"Get object values\n\n###\n\n","completion":" Values | object | values | IMPLICIT | NONE\nfunction (inputObj, outputValues) {\n const { input } = inputObj;\n const { output } = outputValues;\n const valuesArr = Object.values(input);\n output.next(valuesArr);\n}###"}
{"prompt":"Extract object entries\n\n###\n\n","completion":" Entries | object | entries | IMPLICIT | NONE\n({ object }, { entries }) => entries.next(Object.entries(object))###"}
{"prompt":"Convert object to entries\n\n###\n\n","completion":" Entries | object | entries | IMPLICIT | NONE\nfunction (inputObj, outputEntries) {\n const { object } = inputObj;\n const { entries } = outputEntries;\n const objectEntries = Object.entries(object);\n entries.next(objectEntries);\n}###"}
{"prompt":"Get object key-value pairs\n\n###\n\n","completion":" Entries | object | entries | IMPLICIT | NONE\n({ object }, { entries }) => entries.next(Object.entries(object))###"}
{"prompt":"Create entries from object\n\n###\n\n","completion":" Entries | object | entries | IMPLICIT | NONE\nfunction (inputObj, outputEntries) {\n const { object } = inputObj;\n const { entries } = outputEntries;\n const objectEntries = Object.entries(object);\n entries.next(objectEntries);\n}###"}
{"prompt":"Create object from entries\n\n###\n\n","completion":" From Entries | entries | object | IMPLICIT | NONE\n({ entries }, { object }) => object.next(Object.fromEntries(entries))###"}
{"prompt":"Convert entries to object\n\n###\n\n","completion":" From Entries | entries | object | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { entries } = inputData;\n const { object } = outputData;\n\n const result = {};\n for (const [key, value] of entries) {\n result[key] = value;\n }\n object.next(result);\n}###"}
{"prompt":"Entries to object converter\n\n###\n\n","completion":" From Entries | entries | object | IMPLICIT | NONE\n({ entries }, { object }) => object.next(Object.fromEntries(entries))###"}
{"prompt":"Part that transforms entries to object\n\n###\n\n","completion":" From Entries | entries | object | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { entries } = inputData;\n const { object } = outputData;\n\n const result = {};\n for (const [key, value] of entries) {\n result[key] = value;\n }\n object.next(result);\n}###"}
{"prompt":"Combine objects\n\n###\n\n","completion":" Assign | target,sources | object | IMPLICIT | NONE\n({ target, sources }, { object }) =>\n object.next(Object.assign(target, ...sources))###"}
{"prompt":"Merge objects together\n\n###\n\n","completion":" Assign | target,sources | object | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { target, sources } = inputs;\n const { object } = outputs;\n\n const newObj = Object.assign(target, ...sources);\n object.next(newObj);\n}###"}
{"prompt":"Combine multiple objects into one\n\n###\n\n","completion":" Assign | target,sources | object | IMPLICIT | NONE\n({ target, sources }, { object }) =>\n object.next(Object.assign(target, ...sources))###"}
{"prompt":"Assign values from multiple objects\n\n###\n\n","completion":" Assign | target,sources | object | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { target, sources } = inputs;\n const { object } = outputs;\n\n const newObj = Object.assign(target, ...sources);\n object.next(newObj);\n}###"}
{"prompt":"Get value from object attribute\n\n###\n\n","completion":" Get Attribute | object,attribute | value | IMPLICIT | NONE\n({ object, attribute }, { value }) =>\n value.next(attribute.split(\".\").reduce((obj, i) => obj[i], object))###"}
{"prompt":"Extract value from object\n\n###\n\n","completion":" Get Attribute | object,attribute | value | IMPLICIT | NONE\nfunction (inputObj, outputObj, adv) {\n const { obj, attr } = inputObj;\n const { val } = outputObj;\n const attributeArray = attr.split('.');\n let value = obj;\n for (let i = 0; i < attributeArray.length; i++) {\n value = value[attributeArray[i]];\n }\n val.next(value);\n}###"}
{"prompt":"Get attribute value\n\n###\n\n","completion":" Get Attribute | object,attribute | value | IMPLICIT | NONE\n({ object, attribute }, { value }) =>\n value.next(attribute.split(\".\").reduce((obj, i) => obj[i], object))###"}
{"prompt":"Retrieve value from object attribute\n\n###\n\n","completion":" Get Attribute | object,attribute | value | IMPLICIT | NONE\nfunction (inputObj, outputObj, adv) {\n const { obj, attr } = inputObj;\n const { val } = outputObj;\n const attributeArray = attr.split('.');\n let value = obj;\n for (let i = 0; i < attributeArray.length; i++) {\n value = value[attributeArray[i]];\n }\n val.next(value);\n}###"}
{"prompt":"Set object attribute value\n\n###\n\n","completion":" Set Attribute | object,attribute,value | object | IMPLICIT | NONE\n({ object, attribute, value }, { object: outputObject }) => {\n const attributes = attribute.split(\".\");\n const last = attributes.pop();\n const target = attributes.reduce((obj, i) => obj[i], object);\n target[last] = value;\n return outputObject.next(object);\n }###"}
{"prompt":"Change object attribute\n\n###\n\n","completion":" Set Attribute | object,attribute,value | object | IMPLICIT | NONE\nfunction ({ inputObject, attributeName, attributeValue }, { outputObject }) {\n inputObject[attributeName] = attributeValue;\n outputObject.next(inputObject);\n}###"}
{"prompt":"Update object attribute\n\n###\n\n","completion":" Set Attribute | object,attribute,value | object | IMPLICIT | NONE\n({ object, attribute, value }, { object: outputObject }) => {\n const attributes = attribute.split(\".\");\n const last = attributes.pop();\n const target = attributes.reduce((obj, i) => obj[i], object);\n target[last] = value;\n return outputObject.next(object);\n }###"}
{"prompt":"Modify object attribute\n\n###\n\n","completion":" Set Attribute | object,attribute,value | object | IMPLICIT | NONE\nfunction ({ inputObject, attributeName, attributeValue }, { outputObject }) {\n inputObject[attributeName] = attributeValue;\n outputObject.next(inputObject);\n}###"}
{"prompt":"Remove object attribute\n\n###\n\n","completion":" Delete Attribute | object,attribute | object | IMPLICIT | NONE\n({ object, attribute }, { object: outputObject }) => {\n \/\/ delete attribute from object while supporting dot notation\n const attributes = attribute.value.split(\".\");\n const last = attributes.pop();\n const target = attributes.reduce((obj, i) => obj[i], object.value);\n delete target[last];\n outputObject.next(object.value);\n }###"}
{"prompt":"Delete object property\n\n###\n\n","completion":" Delete Attribute | object,attribute | object | IMPLICIT | NONE\nfunction ({ obj, attr }, { obj: outputObj }) {\n const { [attr]: _, ...rest } = obj.value;\n outputObj.next(rest);\n}###"}
{"prompt":"Remove property from object\n\n###\n\n","completion":" Delete Attribute | object,attribute | object | IMPLICIT | NONE\n({ object, attribute }, { object: outputObject }) => {\n \/\/ delete attribute from object while supporting dot notation\n const attributes = attribute.value.split(\".\");\n const last = attributes.pop();\n const target = attributes.reduce((obj, i) => obj[i], object.value);\n delete target[last];\n outputObject.next(object.value);\n }###"}
{"prompt":"Delete object attribute using dot notation\n\n###\n\n","completion":" Delete Attribute | object,attribute | object | IMPLICIT | NONE\nfunction ({ obj, attr }, { obj: outputObj }) {\n const { [attr]: _, ...rest } = obj.value;\n outputObj.next(rest);\n}###"}
{"prompt":"Check if object attribute equals value\n\n###\n\n","completion":" Property Equals | object,attribute,value | true,false | IMPLICIT | NONE\n(inputs, outputs) => {\n \/\/ get attribute from object while supporting dot notation\n const value = inputs.attribute\n .split(\".\")\n .reduce((obj, i) => obj[i], inputs.object);\n if (value === inputs.value) {\n outputs.true.next(inputs.object);\n } else {\n outputs.false.next(inputs.object);\n }\n }###"}
{"prompt":"Compare object attribute to value\n\n###\n\n","completion":" Property Equals | object,attribute,value | true,false | IMPLICIT | NONE\nfunction (inputObj, outputObj) {\n const { obj, attr, val } = inputObj;\n const { trueOutput, falseOutput } = outputObj;\n const attributeValue = attr.split('.').reduce((obj, i) => obj[i], obj);\n if (attributeValue === val) {\n trueOutput.next(obj);\n } else {\n falseOutput.next(obj);\n }\n}###"}
{"prompt":"Object attribute value checker\n\n###\n\n","completion":" Property Equals | object,attribute,value | true,false | IMPLICIT | NONE\n(inputs, outputs) => {\n \/\/ get attribute from object while supporting dot notation\n const value = inputs.attribute\n .split(\".\")\n .reduce((obj, i) => obj[i], inputs.object);\n if (value === inputs.value) {\n outputs.true.next(inputs.object);\n } else {\n outputs.false.next(inputs.object);\n }\n }###"}
{"prompt":"Object attribute value comparison\n\n###\n\n","completion":" Property Equals | object,attribute,value | true,false | IMPLICIT | NONE\nfunction (inputObj, outputObj) {\n const { obj, attr, val } = inputObj;\n const { trueOutput, falseOutput } = outputObj;\n const attributeValue = attr.split('.').reduce((obj, i) => obj[i], obj);\n if (attributeValue === val) {\n trueOutput.next(obj);\n } else {\n falseOutput.next(obj);\n }\n}###"}
{"prompt":"Subtract two numbers\n\n###\n\n","completion":" Subtract | n1,n2 | difference | IMPLICIT | NONE\n({ n1, n2 }, { difference }) => difference.next(n1 - n2)###"}
{"prompt":"Calculate difference between two numbers\n\n###\n\n","completion":" Subtract | n1,n2 | difference | IMPLICIT | NONE\nfunction ({ num1, num2 }, { result }) { result.next(num1 - num2); }###"}
{"prompt":"Simple subtraction\n\n###\n\n","completion":" Subtract | n1,n2 | difference | IMPLICIT | NONE\n({ n1, n2 }, { difference }) => difference.next(n1 - n2)###"}
{"prompt":"Subtract values\n\n###\n\n","completion":" Subtract | n1,n2 | difference | IMPLICIT | NONE\nfunction ({ num1, num2 }, { result }) { result.next(num1 - num2); }###"}
{"prompt":"Multiply two numbers\n\n###\n\n","completion":" Multiply | n1,n2 | product | IMPLICIT | NONE\n({ n1, n2 }, { product }) => product.next(n1 * n2)###"}
{"prompt":"Calculate product of two numbers\n\n###\n\n","completion":" Multiply | n1,n2 | product | IMPLICIT | NONE\nfunction ({ num1, num2 }, { result }) { result.next(num1 * num2); }###"}
{"prompt":"Simple multiplication\n\n###\n\n","completion":" Multiply | n1,n2 | product | IMPLICIT | NONE\n({ n1, n2 }, { product }) => product.next(n1 * n2)###"}
{"prompt":"Multiply inputs to get product\n\n###\n\n","completion":" Multiply | n1,n2 | product | IMPLICIT | NONE\nfunction ({ num1, num2 }, { result }) { result.next(num1 * num2); }###"}
{"prompt":"Divide two numbers\n\n###\n\n","completion":" Divide | n1,n2 | quotient | IMPLICIT | NONE\n({ n1, n2 }, { quotient }) => quotient.next(n1 \/ n2)###"}
{"prompt":"Calculate quotient of two numbers\n\n###\n\n","completion":" Divide | n1,n2 | quotient | IMPLICIT | NONE\nfunction ({ dividend, divisor }, { quotient }) { quotient.next(dividend \/ divisor); }###"}
{"prompt":"Part that divides two numbers\n\n###\n\n","completion":" Divide | n1,n2 | quotient | IMPLICIT | NONE\n({ n1, n2 }, { quotient }) => quotient.next(n1 \/ n2)###"}
{"prompt":"A node that outputs the quotient of two numbers\n\n###\n\n","completion":" Divide | n1,n2 | quotient | IMPLICIT | NONE\nfunction ({ dividend, divisor }, { quotient }) { quotient.next(dividend \/ divisor); }###"}
{"prompt":"Calculate remainder of division\n\n###\n\n","completion":" Modulo | n1,n2 | remainder | IMPLICIT | NONE\n({ n1, n2 }, { remainder }) => remainder.next(n1 % n2)###"}
{"prompt":"Modulo operation\n\n###\n\n","completion":" Modulo | n1,n2 | remainder | IMPLICIT | NONE\nfunction ({ dividend, divisor }, { remainder }) {\n remainder.next(dividend % divisor);\n}###"}
{"prompt":"Calculate remainder\n\n###\n\n","completion":" Modulo | n1,n2 | remainder | IMPLICIT | NONE\n({ n1, n2 }, { remainder }) => remainder.next(n1 % n2)###"}
{"prompt":"Calculate power of two numbers\n\n###\n\n","completion":" Power | n1,n2 | power | IMPLICIT | NONE\n({ n1, n2 }, { power }) => power.next(Math.pow(n1, n2))###"}
{"prompt":"Calculate exponentiation\n\n###\n\n","completion":" Power | n1,n2 | power | IMPLICIT | NONE\nfunction ({ base, exponent }, { result }) {\n result.next(Math.pow(base, exponent));\n}###"}
{"prompt":"Calculate n1 to the power of n2\n\n###\n\n","completion":" Power | n1,n2 | power | IMPLICIT | NONE\n({ n1, n2 }, { power }) => power.next(Math.pow(n1, n2))###"}
{"prompt":"Calculate the result of n1 raised to the power of n2\n\n###\n\n","completion":" Power | n1,n2 | power | IMPLICIT | NONE\nfunction ({ base, exponent }, { result }) {\n result.next(Math.pow(base, exponent));\n}###"}
{"prompt":"Calculate square root\n\n###\n\n","completion":" Square Root | n | root | IMPLICIT | NONE\n({ n }, { root }) => root.next(Math.sqrt(n))###"}
{"prompt":"Find root of a number\n\n###\n\n","completion":" Square Root | n | root | IMPLICIT | NONE\nfunction ({ number }, { result }) {\n return result.next(Math.sqrt(number));\n}###"}
{"prompt":"Calculate the square root of a number\n\n###\n\n","completion":" Square Root | n | root | IMPLICIT | NONE\n({ n }, { root }) => root.next(Math.sqrt(n))###"}
{"prompt":"Get the square root of a number\n\n###\n\n","completion":" Square Root | n | root | IMPLICIT | NONE\nfunction ({ number }, { result }) {\n return result.next(Math.sqrt(number));\n}###"}
{"prompt":"Calculate absolute value\n\n###\n\n","completion":" Absolute Value | n | absolute | IMPLICIT | NONE\n({ n }, { absolute }) => absolute.next(Math.abs(n))###"}
{"prompt":"Get absolute value of a number\n\n###\n\n","completion":" Absolute Value | n | absolute | IMPLICIT | NONE\nfunction (input, output) {\n const { n } = input;\n const { absolute } = output;\n absolute.next(Math.abs(n));\n}###"}
{"prompt":"Part that returns the absolute value\n\n###\n\n","completion":" Absolute Value | n | absolute | IMPLICIT | NONE\n({ n }, { absolute }) => absolute.next(Math.abs(n))###"}
{"prompt":"A node that outputs the absolute value of an input\n\n###\n\n","completion":" Absolute Value | n | absolute | IMPLICIT | NONE\nfunction (input, output) {\n const { n } = input;\n const { absolute } = output;\n absolute.next(Math.abs(n));\n}###"}
{"prompt":"Round down number\n\n###\n\n","completion":" Floor | n | floor | IMPLICIT | NONE\n({ n }, { floor }) => floor.next(Math.floor(n))###"}
{"prompt":"Calculate floor value\n\n###\n\n","completion":" Floor | n | floor | IMPLICIT | NONE\nfunction ({ inputNumber }, { outputFloor }) {\n outputFloor.next(Math.floor(inputNumber));\n}###"}
{"prompt":"Get integer part of number\n\n###\n\n","completion":" Floor | n | floor | IMPLICIT | NONE\n({ n }, { floor }) => floor.next(Math.floor(n))###"}
{"prompt":"Find the largest integer less than or equal to a number\n\n###\n\n","completion":" Floor | n | floor | IMPLICIT | NONE\nfunction ({ inputNumber }, { outputFloor }) {\n outputFloor.next(Math.floor(inputNumber));\n}###"}
{"prompt":"Round up number\n\n###\n\n","completion":" Ceiling | n | ceiling | IMPLICIT | NONE\n({ n }, { ceiling }) => ceiling.next(Math.ceil(n))###"}
{"prompt":"Calculate ceiling\n\n###\n\n","completion":" Ceiling | n | ceiling | IMPLICIT | NONE\nfunction ({ inputNumber }, { outputCeiling }) {\n const { inputNumber } = inputs;\n const { outputCeiling } = outputs;\n outputCeiling.next(Math.ceil(inputNumber));\n}###"}
{"prompt":"Get integer ceiling\n\n###\n\n","completion":" Ceiling | n | ceiling | IMPLICIT | NONE\n({ n }, { ceiling }) => ceiling.next(Math.ceil(n))###"}
{"prompt":"Get rounded up value\n\n###\n\n","completion":" Ceiling | n | ceiling | IMPLICIT | NONE\nfunction ({ inputNumber }, { outputCeiling }) {\n const { inputNumber } = inputs;\n const { outputCeiling } = outputs;\n outputCeiling.next(Math.ceil(inputNumber));\n}###"}
{"prompt":"Shorten Number\n\n###\n\n","completion":" Truncate | n | truncated | IMPLICIT | NONE\n({ n }, { truncated }) => truncated.next(Math.trunc(n))###"}
{"prompt":"Truncate Decimal\n\n###\n\n","completion":" Truncate | n | truncated | IMPLICIT | NONE\nfunction ({ number }, { truncated }) {truncated.next(Math.trunc(number))}###"}
{"prompt":"Remove Decimal Places\n\n###\n\n","completion":" Truncate | n | truncated | IMPLICIT | NONE\n({ n }, { truncated }) => truncated.next(Math.trunc(n))###"}
{"prompt":"Round Down\n\n###\n\n","completion":" Truncate | n | truncated | IMPLICIT | NONE\nfunction ({ number }, { truncated }) {truncated.next(Math.trunc(number))}###"}
{"prompt":"Calculate sine of an angle\n\n###\n\n","completion":" Sin | angle | sine | IMPLICIT | NONE\n({ angle }, { sine }) => sine.next(Math.sin(angle))###"}
{"prompt":"Sine calculator\n\n###\n\n","completion":" Sin | angle | sine | IMPLICIT | NONE\nfunction (input, output) {\n const { angle } = input;\n const { sine } = output;\n sine.next(Math.sin(angle));\n}###"}
{"prompt":"Calculate the sine value\n\n###\n\n","completion":" Sin | angle | sine | IMPLICIT | NONE\n({ angle }, { sine }) => sine.next(Math.sin(angle))###"}
{"prompt":"Get the sine of an angle\n\n###\n\n","completion":" Sin | angle | sine | IMPLICIT | NONE\nfunction (input, output) {\n const { angle } = input;\n const { sine } = output;\n sine.next(Math.sin(angle));\n}###"}
{"prompt":"Calculate cosine of an angle\n\n###\n\n","completion":" Cos | angle | cosine | IMPLICIT | NONE\n({ angle }, { cosine }) => cosine.next(Math.cos(angle))###"}
{"prompt":"Calculate the cosine value\n\n###\n\n","completion":" Cos | angle | cosine | IMPLICIT | NONE\nfunction ({ angleInput }, { cosineOutput }) {\n const { angle } = angleInput;\n const { cosine } = cosineOutput;\n cosine.next(Math.cos(angle));\n}###"}
{"prompt":"Part that calculates cosine\n\n###\n\n","completion":" Cos | angle | cosine | IMPLICIT | NONE\n({ angle }, { cosine }) => cosine.next(Math.cos(angle))###"}
{"prompt":"Calculate the cosine of an angle in radians\n\n###\n\n","completion":" Cos | angle | cosine | IMPLICIT | NONE\nfunction ({ angleInput }, { cosineOutput }) {\n const { angle } = angleInput;\n const { cosine } = cosineOutput;\n cosine.next(Math.cos(angle));\n}###"}
{"prompt":"Find minimum value\n\n###\n\n","completion":" Min | n1,n2 | min | IMPLICIT | NONE\n({ n1, n2 }, { min }) => min.next(Math.min(n1, n2))###"}
{"prompt":"Calculate minimum\n\n###\n\n","completion":" Min | n1,n2 | min | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { num1, num2 } = inputs;\n const { minimum } = outputs;\n \n const newMinimum = Math.min(num1, num2);\n minimum.next(newMinimum);\n}###"}
{"prompt":"Get smallest number\n\n###\n\n","completion":" Min | n1,n2 | min | IMPLICIT | NONE\n({ n1, n2 }, { min }) => min.next(Math.min(n1, n2))###"}
{"prompt":"Determine the minimum value\n\n###\n\n","completion":" Min | n1,n2 | min | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { num1, num2 } = inputs;\n const { minimum } = outputs;\n \n const newMinimum = Math.min(num1, num2);\n minimum.next(newMinimum);\n}###"}
{"prompt":"Find maximum of two numbers\n\n###\n\n","completion":" Max | n1,n2 | max | IMPLICIT | NONE\n({ n1, n2 }, { max }) => max.next(Math.max(n1, n2))###"}
{"prompt":"Calculate the larger number\n\n###\n\n","completion":" Max | n1,n2 | max | IMPLICIT | NONE\nfunction ({ num1, num2 }, { maxVal }) { maxVal.next(Math.max(num1, num2)); }###"}
{"prompt":"Determine the maximum value\n\n###\n\n","completion":" Max | n1,n2 | max | IMPLICIT | NONE\n({ n1, n2 }, { max }) => max.next(Math.max(n1, n2))###"}
{"prompt":"Get the highest number\n\n###\n\n","completion":" Max | n1,n2 | max | IMPLICIT | NONE\nfunction ({ num1, num2 }, { maxVal }) { maxVal.next(Math.max(num1, num2)); }###"}
{"prompt":"Convert string to integer\n\n###\n\n","completion":" Parse Int | str | int | IMPLICIT | NONE\n({ str }, { int }) => int.next(parseInt(str))###"}
{"prompt":"Parse string as integer\n\n###\n\n","completion":" Parse Int | str | int | IMPLICIT | NONE\nfunction ({ inputStr }, { outputInt }) {\n const { inputStr } = inputs;\n const { outputInt } = outputs;\n outputInt.next(parseInt(inputStr));\n}###"}
{"prompt":"Extract integer from string\n\n###\n\n","completion":" Parse Int | str | int | IMPLICIT | NONE\n({ str }, { int }) => int.next(parseInt(str))###"}
{"prompt":"Convert text to number\n\n###\n\n","completion":" Parse Int | str | int | IMPLICIT | NONE\nfunction ({ inputStr }, { outputInt }) {\n const { inputStr } = inputs;\n const { outputInt } = outputs;\n outputInt.next(parseInt(inputStr));\n}###"}
{"prompt":"Convert string to float\n\n###\n\n","completion":" Parse Float | str | float | IMPLICIT | NONE\n({ str }, { float }) => float.next(parseFloat(str))###"}
{"prompt":"Parse string as float\n\n###\n\n","completion":" Parse Float | str | float | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { str } = inputData;\n const { float } = outputData;\n \n const parsedFloat = parseFloat(str);\n float.next(parsedFloat);\n}###"}
{"prompt":"String to float converter\n\n###\n\n","completion":" Parse Float | str | float | IMPLICIT | NONE\n({ str }, { float }) => float.next(parseFloat(str))###"}
{"prompt":"Convert a string to a floating point number\n\n###\n\n","completion":" Parse Float | str | float | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { str } = inputData;\n const { float } = outputData;\n \n const parsedFloat = parseFloat(str);\n float.next(parsedFloat);\n}###"}
{"prompt":"Round number to fixed decimal places\n\n###\n\n","completion":" To Fixed | number,places | fixed | IMPLICIT | NONE\n({ number, places }, { fixed }) => fixed.next(number.toFixed(places))###"}
{"prompt":"Convert number to fixed decimal format\n\n###\n\n","completion":" To Fixed | number,places | fixed | IMPLICIT | NONE\nfunction ({ inputNumber, decimalPlaces }, { fixedNumber }) {\n const { inputNumber, decimalPlaces } = inputs;\n const { fixedNumber } = outputs;\n fixedNumber.next(inputNumber.toFixed(decimalPlaces));\n}###"}
{"prompt":"Create fixed decimal number\n\n###\n\n","completion":" To Fixed | number,places | fixed | IMPLICIT | NONE\n({ number, places }, { fixed }) => fixed.next(number.toFixed(places))###"}
{"prompt":"Limit decimal places of number\n\n###\n\n","completion":" To Fixed | number,places | fixed | IMPLICIT | NONE\nfunction ({ inputNumber, decimalPlaces }, { fixedNumber }) {\n const { inputNumber, decimalPlaces } = inputs;\n const { fixedNumber } = outputs;\n fixedNumber.next(inputNumber.toFixed(decimalPlaces));\n}###"}
{"prompt":"Convert number to exponential notation\n\n###\n\n","completion":" To Exponential | number,places | exponential | IMPLICIT | NONE\n({ number, places }, { exponential }) =>\n exponential.next(number.toExponential(places))###"}
{"prompt":"Convert number to scientific notation\n\n###\n\n","completion":" To Exponential | number,places | exponential | IMPLICIT | NONE\nfunction ({ num, dec }, { exp }) { exp.next(num.toExponential(dec)) }###"}
{"prompt":"Get exponential notation of number\n\n###\n\n","completion":" To Exponential | number,places | exponential | IMPLICIT | NONE\n({ number, places }, { exponential }) =>\n exponential.next(number.toExponential(places))###"}
{"prompt":"Transform number to exponential notation\n\n###\n\n","completion":" To Exponential | number,places | exponential | IMPLICIT | NONE\nfunction ({ num, dec }, { exp }) { exp.next(num.toExponential(dec)) }###"}
{"prompt":"Compare two numbers\n\n###\n\n","completion":" Greater Than | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 > n2)###"}
{"prompt":"Check if first number is greater than second\n\n###\n\n","completion":" Greater Than | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) {\n output.next(num1 > num2);\n}###"}
{"prompt":"Number comparison\n\n###\n\n","completion":" Greater Than | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 > n2)###"}
{"prompt":"Compare two numbers\n\n###\n\n","completion":" Greater Than Or Equal | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 >= n2)###"}
{"prompt":"Check if first number is greater than or equal to second number\n\n###\n\n","completion":" Greater Than Or Equal | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) {\n output.next(num1 >= num2);\n}###"}
{"prompt":"Number comparison\n\n###\n\n","completion":" Greater Than Or Equal | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 >= n2)###"}
{"prompt":"Check if one number is greater than or equal to another\n\n###\n\n","completion":" Greater Than Or Equal | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) {\n output.next(num1 >= num2);\n}###"}
{"prompt":"Compare two numbers\n\n###\n\n","completion":" Less Than | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 < n2)###"}
{"prompt":"Check if first number is less than second\n\n###\n\n","completion":" Less Than | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) {\n output.next(num1 < num2);\n}###"}
{"prompt":"Number comparison\n\n###\n\n","completion":" Less Than | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 < n2)###"}
{"prompt":"Part that checks if one number is less than another\n\n###\n\n","completion":" Less Than | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) {\n output.next(num1 < num2);\n}###"}
{"prompt":"Compare two numbers\n\n###\n\n","completion":" Less Than Or Equal | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 <= n2)###"}
{"prompt":"Check if first number is less than or equal to second number\n\n###\n\n","completion":" Less Than Or Equal | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) { output.next(num1 <= num2); }###"}
{"prompt":"Number comparison\n\n###\n\n","completion":" Less Than Or Equal | n1,n2 | result | IMPLICIT | NONE\n({ n1, n2 }, { result }) => result.next(n1 <= n2)###"}
{"prompt":"Determine if first number is less than or equal to second number\n\n###\n\n","completion":" Less Than Or Equal | n1,n2 | result | IMPLICIT | NONE\nfunction ({ num1, num2 }, { output }) { output.next(num1 <= num2); }###"}
{"prompt":"Calculate sum of list\n\n###\n\n","completion":" Sum List | list | sum | IMPLICIT | NONE\n({ list }, { sum }) => sum.next(list.reduce((a, b) => a + b, 0))###"}
{"prompt":"Sum up a list of numbers\n\n###\n\n","completion":" Sum List | list | sum | IMPLICIT | NONE\nfunction ({ inputList }, { outputSum }) {\n const { list } = inputList;\n const { sum } = outputSum;\n sum.next(list.reduce((a, b) => a + b, 0));\n}###"}
{"prompt":"Add up a list of values\n\n###\n\n","completion":" Sum List | list | sum | IMPLICIT | NONE\n({ list }, { sum }) => sum.next(list.reduce((a, b) => a + b, 0))###"}
{"prompt":"Calculate the total of a list\n\n###\n\n","completion":" Sum List | list | sum | IMPLICIT | NONE\nfunction ({ inputList }, { outputSum }) {\n const { list } = inputList;\n const { sum } = outputSum;\n sum.next(list.reduce((a, b) => a + b, 0));\n}###"}
{"prompt":"Split a string\n\n###\n\n","completion":" Split | string,separator | value | IMPLICIT | NONE\n({ string, separator }, { value }) =>\n value.next(string.split(separator))###"}
{"prompt":"Divide string into parts\n\n###\n\n","completion":" Split | string,separator | value | IMPLICIT | NONE\nfunction ({ inputString, separator }, { outputArray }) {\n const splitArray = inputString.split(separator);\n outputArray.next(splitArray);\n}###"}
{"prompt":"Split string into array\n\n###\n\n","completion":" Split | string,separator | value | IMPLICIT | NONE\n({ string, separator }, { value }) =>\n value.next(string.split(separator))###"}
{"prompt":"Separate string into multiple parts\n\n###\n\n","completion":" Split | string,separator | value | IMPLICIT | NONE\nfunction ({ inputString, separator }, { outputArray }) {\n const splitArray = inputString.split(separator);\n outputArray.next(splitArray);\n}###"}
{"prompt":"Join an array with a separator\n\n###\n\n","completion":" Join | array,separator | value | IMPLICIT | NONE\n({ array, separator }, { value }) => value.next(array.join(separator))###"}
{"prompt":"Combine array elements with a separator\n\n###\n\n","completion":" Join | array,separator | value | IMPLICIT | NONE\nfunction ({ inputArray, separator }, { outputValue }) {\n const joinedArray = inputArray.join(separator);\n outputValue.next(joinedArray);\n}###"}
{"prompt":"Create a string from an array with a separator\n\n###\n\n","completion":" Join | array,separator | value | IMPLICIT | NONE\n({ array, separator }, { value }) => value.next(array.join(separator))###"}
{"prompt":"Join array elements using a separator\n\n###\n\n","completion":" Join | array,separator | value | IMPLICIT | NONE\nfunction ({ inputArray, separator }, { outputValue }) {\n const joinedArray = inputArray.join(separator);\n outputValue.next(joinedArray);\n}###"}
{"prompt":"Replace text in string\n\n###\n\n","completion":" Replace | string,searchValue,replaceValue | value | IMPLICIT | NONE\n({ string, searchValue, replaceValue }, { value }) =>\n value.next(string.replace(searchValue, replaceValue))###"}
{"prompt":"Replace values in string\n\n###\n\n","completion":" Replace | string,searchValue,replaceValue | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, replaceValue }, { outputString }) => { outputString.next(inputString.replace(searchValue, replaceValue)) }###"}
{"prompt":"Modify string content\n\n###\n\n","completion":" Replace | string,searchValue,replaceValue | value | IMPLICIT | NONE\n({ string, searchValue, replaceValue }, { value }) =>\n value.next(string.replace(searchValue, replaceValue))###"}
{"prompt":"Change text in string\n\n###\n\n","completion":" Replace | string,searchValue,replaceValue | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, replaceValue }, { outputString }) => { outputString.next(inputString.replace(searchValue, replaceValue)) }###"}
{"prompt":"Remove whitespace from string\n\n###\n\n","completion":" Trim | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.trim())###"}
{"prompt":"Trim string\n\n###\n\n","completion":" Trim | string | value | IMPLICIT | NONE\nfunction (input, output) {\n const { string } = input;\n const { value } = output;\n const trimmedString = string.trim();\n value.next(trimmedString);\n}###"}
{"prompt":"Trim leading\/trailing spaces\n\n###\n\n","completion":" Trim | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.trim())###"}
{"prompt":"Clean up string\n\n###\n\n","completion":" Trim | string | value | IMPLICIT | NONE\nfunction (input, output) {\n const { string } = input;\n const { value } = output;\n const trimmedString = string.trim();\n value.next(trimmedString);\n}###"}
{"prompt":"Convert string to lowercase\n\n###\n\n","completion":" To Lower Case | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.toLowerCase())###"}
{"prompt":"Lowercase string\n\n###\n\n","completion":" To Lower Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n const { string } = inputString;\n const { value } = outputValue;\n value.next(string.toLowerCase());\n}###"}
{"prompt":"Transform string to lowercase\n\n###\n\n","completion":" To Lower Case | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.toLowerCase())###"}
{"prompt":"Change string to lowercase\n\n###\n\n","completion":" To Lower Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n const { string } = inputString;\n const { value } = outputValue;\n value.next(string.toLowerCase());\n}###"}
{"prompt":"Convert string to uppercase\n\n###\n\n","completion":" To Upper Case | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.toUpperCase())###"}
{"prompt":"Uppercase string\n\n###\n\n","completion":" To Upper Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n const { inputString } = inputs;\n const { outputValue } = outputs;\n outputValue.next(inputString.toUpperCase());\n}###"}
{"prompt":"Convert text to uppercase letters\n\n###\n\n","completion":" To Upper Case | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.toUpperCase())###"}
{"prompt":"Transform string to all uppercase\n\n###\n\n","completion":" To Upper Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n const { inputString } = inputs;\n const { outputValue } = outputs;\n outputValue.next(inputString.toUpperCase());\n}###"}
{"prompt":"Extract a part of a string\n\n###\n\n","completion":" Substring | string,start,end | value | IMPLICIT | NONE\n({ string, start, end }, { value }) =>\n value.next(string.substring(start, end))###"}
{"prompt":"Get a substring from a string\n\n###\n\n","completion":" Substring | string,start,end | value | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { string, start, end } = inputs;\n const { value } = outputs;\n\n const subString = string.substring(start, end);\n value.next(subString);\n}###"}
{"prompt":"Select a portion of a string\n\n###\n\n","completion":" Substring | string,start,end | value | IMPLICIT | NONE\n({ string, start, end }, { value }) =>\n value.next(string.substring(start, end))###"}
{"prompt":"Get a part of a string based on start and end positions\n\n###\n\n","completion":" Substring | string,start,end | value | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { string, start, end } = inputs;\n const { value } = outputs;\n\n const subString = string.substring(start, end);\n value.next(subString);\n}###"}
{"prompt":"Measure string length\n\n###\n\n","completion":" Length | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.length)###"}
{"prompt":"Count characters in string\n\n###\n\n","completion":" Length | string | value | IMPLICIT | NONE\nfunction (input, output) {\n const { inputString } = input;\n const { outputValue } = output;\n outputValue.next(inputString.length);\n}###"}
{"prompt":"Length of input string\n\n###\n\n","completion":" Length | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.length)###"}
{"prompt":"Calculate string length\n\n###\n\n","completion":" Length | string | value | IMPLICIT | NONE\nfunction (input, output) {\n const { inputString } = input;\n const { outputValue } = output;\n outputValue.next(inputString.length);\n}###"}
{"prompt":"Find index of substring\n\n###\n\n","completion":" Index Of | string,searchValue,fromIndex | value | IMPLICIT | NONE\n({ string, searchValue, fromIndex }, { value }) =>\n value.next(string.indexOf(searchValue, fromIndex))###"}
{"prompt":"Get index of substring\n\n###\n\n","completion":" Index Of | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, startIndex }, { result }) { result.next(inputString.indexOf(searchValue, startIndex)); }###"}
{"prompt":"Locate substring index\n\n###\n\n","completion":" Index Of | string,searchValue,fromIndex | value | IMPLICIT | NONE\n({ string, searchValue, fromIndex }, { value }) =>\n value.next(string.indexOf(searchValue, fromIndex))###"}
{"prompt":"Search for substring index\n\n###\n\n","completion":" Index Of | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, startIndex }, { result }) { result.next(inputString.indexOf(searchValue, startIndex)); }###"}
{"prompt":"Get character at index\n\n###\n\n","completion":" Char At | string,index | value | IMPLICIT | NONE\n({ string, index }, { value }) => value.next(string.charAt(index))###"}
{"prompt":"Retrieve character from string\n\n###\n\n","completion":" Char At | string,index | value | IMPLICIT | NONE\nfunction ({ str, idx }, { val }) {\n return val.next(str.charAt(idx));\n}###"}
{"prompt":"Extract character from string\n\n###\n\n","completion":" Char At | string,index | value | IMPLICIT | NONE\n({ string, index }, { value }) => value.next(string.charAt(index))###"}
{"prompt":"Get single character from string\n\n###\n\n","completion":" Char At | string,index | value | IMPLICIT | NONE\nfunction ({ str, idx }, { val }) {\n return val.next(str.charAt(idx));\n}###"}
{"prompt":"Convert string to kebab case\n\n###\n\n","completion":" To Kebab Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string\n .replace(\/([a-z])([A-Z])\/g, \"$1-$2\")\n .replace(\/\\s+\/g, \"-\")\n .toLowerCase()\n )###"}
{"prompt":"Change string to kebab case\n\n###\n\n","completion":" To Kebab Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n outputValue.next(inputString.replace(\/([a-z])([A-Z])\/g, '$1-$2').replace(\/\\s+\/g, '-').toLowerCase());\n}###"}
{"prompt":"Transform string to kebab case\n\n###\n\n","completion":" To Kebab Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string\n .replace(\/([a-z])([A-Z])\/g, \"$1-$2\")\n .replace(\/\\s+\/g, \"-\")\n .toLowerCase()\n )###"}
{"prompt":"Convert string to kebab-case format\n\n###\n\n","completion":" To Kebab Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n outputValue.next(inputString.replace(\/([a-z])([A-Z])\/g, '$1-$2').replace(\/\\s+\/g, '-').toLowerCase());\n}###"}
{"prompt":"Convert string to camel case\n\n###\n\n","completion":" To Camel Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string.replace(\/(?:^\\w|[A-Z]|\\b\\w|\\s+)\/g, (match, index) => {\n if (+match === 0) return \"\";\n return index === 0 ? match.toLowerCase() : match.toUpperCase();\n })\n )###"}
{"prompt":"Camel case a string\n\n###\n\n","completion":" To Camel Case | string | value | IMPLICIT | NONE\nfunction (inputString, outputValue) {\n const { value } = outputValue;\n const camelCaseString = inputString.replace(\/(?:^\\w|[A-Z]|\\b\\w|\\s+)\/g, (match, index) => {\n if (+match === 0) return \"\";\n return index === 0 ? match.toLowerCase() : match.toUpperCase();\n });\n value.next(camelCaseString);\n}###"}
{"prompt":"Transform string to camel case\n\n###\n\n","completion":" To Camel Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string.replace(\/(?:^\\w|[A-Z]|\\b\\w|\\s+)\/g, (match, index) => {\n if (+match === 0) return \"\";\n return index === 0 ? match.toLowerCase() : match.toUpperCase();\n })\n )###"}
{"prompt":"Change string to camel case\n\n###\n\n","completion":" To Camel Case | string | value | IMPLICIT | NONE\nfunction (inputString, outputValue) {\n const { value } = outputValue;\n const camelCaseString = inputString.replace(\/(?:^\\w|[A-Z]|\\b\\w|\\s+)\/g, (match, index) => {\n if (+match === 0) return \"\";\n return index === 0 ? match.toLowerCase() : match.toUpperCase();\n });\n value.next(camelCaseString);\n}###"}
{"prompt":"Convert string to Pascal Case\n\n###\n\n","completion":" To Pascal Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string\n .replace(\/(?:^\\w|[A-Z]|\\b\\w)\/g, (match, index) => {\n return index === 0 ? match.toUpperCase() : match.toLowerCase();\n })\n .replace(\/\\s+\/g, \"\")\n )###"}
{"prompt":"Convert string to PascalCase\n\n###\n\n","completion":" To Pascal Case | string | value | IMPLICIT | NONE\nfunction (inputString, outputValue) {\n const words = inputString.split(\/\\s+\/);\n const pascalCase = words.map((word) => {\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n }).join('');\n outputValue.next(pascalCase);\n}###"}
{"prompt":"Convert string to PascalCase format\n\n###\n\n","completion":" To Pascal Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string\n .replace(\/(?:^\\w|[A-Z]|\\b\\w)\/g, (match, index) => {\n return index === 0 ? match.toUpperCase() : match.toLowerCase();\n })\n .replace(\/\\s+\/g, \"\")\n )###"}
{"prompt":"Convert a string to Pascal Case format\n\n###\n\n","completion":" To Pascal Case | string | value | IMPLICIT | NONE\nfunction (inputString, outputValue) {\n const words = inputString.split(\/\\s+\/);\n const pascalCase = words.map((word) => {\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n }).join('');\n outputValue.next(pascalCase);\n}###"}
{"prompt":"Convert string to snake case\n\n###\n\n","completion":" To Snake Case | string | value | IMPLICIT | NONE\n(string) =>\n string\n .replace(\/([a-z])([A-Z])\/g, \"$1_$2\")\n .replace(\/\\s+\/g, \"_\")\n .toLowerCase()###"}
{"prompt":"Snake case string\n\n###\n\n","completion":" To Snake Case | string | value | IMPLICIT | NONE\nfunction (inputString, outputValue) {\n const snakeCaseString = inputString.replace(\/([a-z])([A-Z])\/g, '$1_$2').replace(\/\\s+\/g, '_').toLowerCase();\n outputValue.next(snakeCaseString);\n}###"}
{"prompt":"Transform string to snake case format\n\n###\n\n","completion":" To Snake Case | string | value | IMPLICIT | NONE\n(string) =>\n string\n .replace(\/([a-z])([A-Z])\/g, \"$1_$2\")\n .replace(\/\\s+\/g, \"_\")\n .toLowerCase()###"}
{"prompt":"Change string to snake case\n\n###\n\n","completion":" To Snake Case | string | value | IMPLICIT | NONE\nfunction (inputString, outputValue) {\n const snakeCaseString = inputString.replace(\/([a-z])([A-Z])\/g, '$1_$2').replace(\/\\s+\/g, '_').toLowerCase();\n outputValue.next(snakeCaseString);\n}###"}
{"prompt":"Capitalize First Letter of Each Word\n\n###\n\n","completion":" To Title Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string.replace(\n \/\\w\\S*\/g,\n (match) => match.charAt(0).toUpperCase() + match.substr(1).toLowerCase()\n )\n )###"}
{"prompt":"Convert String to Title Case\n\n###\n\n","completion":" To Title Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n const words = inputString.split(' ');\n const capitalizedWords = words.map(word => word.charAt(0).toUpperCase() + word.slice(1));\n const titleCaseString = capitalizedWords.join(' ');\n outputValue.next(titleCaseString);\n}###"}
{"prompt":"Title Case Converter\n\n###\n\n","completion":" To Title Case | string | value | IMPLICIT | NONE\n({ string }, { value }) =>\n value.next(\n string.replace(\n \/\\w\\S*\/g,\n (match) => match.charAt(0).toUpperCase() + match.substr(1).toLowerCase()\n )\n )###"}
{"prompt":"Part that Capitalizes First Letter of Each Word\n\n###\n\n","completion":" To Title Case | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n const words = inputString.split(' ');\n const capitalizedWords = words.map(word => word.charAt(0).toUpperCase() + word.slice(1));\n const titleCaseString = capitalizedWords.join(' ');\n outputValue.next(titleCaseString);\n}###"}
{"prompt":"Check if string includes value\n\n###\n\n","completion":" Includes | string,searchValue,fromIndex | value | IMPLICIT | NONE\n({ string, searchValue, fromIndex }, { value }) =>\n value.next(string.includes(searchValue, fromIndex))###"}
{"prompt":"String contains value?\n\n###\n\n","completion":" Includes | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, startIndex }, { result }) {\n const includesValue = inputString.includes(searchValue, startIndex);\n result.next(includesValue);\n}###"}
{"prompt":"Part that checks if string includes value\n\n###\n\n","completion":" Includes | string,searchValue,fromIndex | value | IMPLICIT | NONE\n({ string, searchValue, fromIndex }, { value }) =>\n value.next(string.includes(searchValue, fromIndex))###"}
{"prompt":"A component that verifies if a string includes a specific value\n\n###\n\n","completion":" Includes | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, startIndex }, { result }) {\n const includesValue = inputString.includes(searchValue, startIndex);\n result.next(includesValue);\n}###"}
{"prompt":"Check if string starts with value\n\n###\n\n","completion":" Starts With | string,searchValue,fromIndex | value | IMPLICIT | NONE\n({ string, searchValue, fromIndex }, { value }) =>\n value.next(string.startsWith(searchValue, fromIndex))###"}
{"prompt":"String start checker\n\n###\n\n","completion":" Starts With | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, startIndex }, { result }) { result.next(inputString.startsWith(searchValue, startIndex)); }###"}
{"prompt":"Part that checks if string starts with value\n\n###\n\n","completion":" Starts With | string,searchValue,fromIndex | value | IMPLICIT | NONE\n({ string, searchValue, fromIndex }, { value }) =>\n value.next(string.startsWith(searchValue, fromIndex))###"}
{"prompt":"A component that verifies if a string starts with a given value\n\n###\n\n","completion":" Starts With | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({ inputString, searchValue, startIndex }, { result }) { result.next(inputString.startsWith(searchValue, startIndex)); }###"}
{"prompt":"Check if string ends with value\n\n###\n\n","completion":" Ends With | string,searchValue,fromIndex | value | IMPLICIT | NONE\n(string, searchValue, fromIndex) =>\n string.endsWith(searchValue, fromIndex)###"}
{"prompt":"Ends with string check\n\n###\n\n","completion":" Ends With | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({stringToCheck, valueToSearch, startingIndex}, {result}) {\n result.next(stringToCheck.endsWith(valueToSearch, startingIndex));\n}###"}
{"prompt":"String ending check\n\n###\n\n","completion":" Ends With | string,searchValue,fromIndex | value | IMPLICIT | NONE\n(string, searchValue, fromIndex) =>\n string.endsWith(searchValue, fromIndex)###"}
{"prompt":"Check if string ends with specified value\n\n###\n\n","completion":" Ends With | string,searchValue,fromIndex | value | IMPLICIT | NONE\nfunction ({stringToCheck, valueToSearch, startingIndex}, {result}) {\n result.next(stringToCheck.endsWith(valueToSearch, startingIndex));\n}###"}
{"prompt":"Check if string is empty\n\n###\n\n","completion":" Is Empty | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.length === 0)###"}
{"prompt":"Detect empty string\n\n###\n\n","completion":" Is Empty | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n return outputValue.next(inputString.length === 0);\n}###"}
{"prompt":"String emptiness checker\n\n###\n\n","completion":" Is Empty | string | value | IMPLICIT | NONE\n({ string }, { value }) => value.next(string.length === 0)###"}
{"prompt":"Part that verifies if a string is empty\n\n###\n\n","completion":" Is Empty | string | value | IMPLICIT | NONE\nfunction ({ inputString }, { outputValue }) {\n return outputValue.next(inputString.length === 0);\n}###"}
{"prompt":"Match a string with a regular expression\n\n###\n\n","completion":" Match Regex | string,regex | value | IMPLICIT | NONE\n({ string, regex }, { value }) => value.next(string.match(regex))###"}
{"prompt":"Find matches in a string using a regex\n\n###\n\n","completion":" Match Regex | string,regex | value | IMPLICIT | NONE\nfunction ({ inputString, regex }, { matches }) {\n const newMatches = inputString.match(regex);\n matches.next(newMatches);\n}###"}
{"prompt":"Regex matcher\n\n###\n\n","completion":" Match Regex | string,regex | value | IMPLICIT | NONE\n({ string, regex }, { value }) => value.next(string.match(regex))###"}
{"prompt":"Part that matches a string with a regular expression\n\n###\n\n","completion":" Match Regex | string,regex | value | IMPLICIT | NONE\nfunction ({ inputString, regex }, { matches }) {\n const newMatches = inputString.match(regex);\n matches.next(newMatches);\n}###"}
{"prompt":"Create an empty string\n\n###\n\n","completion":" Empty String | | string | IMPLICIT | NONE\n({}, { string }) => string.next(\"\")###"}
{"prompt":"Generate an empty string\n\n###\n\n","completion":" Empty String | | string | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { string } = outputs;\n string.next(\"\");\n}###"}
{"prompt":"Produce an empty string\n\n###\n\n","completion":" Empty String | | string | IMPLICIT | NONE\n({}, { string }) => string.next(\"\")###"}
{"prompt":"Create a blank string\n\n###\n\n","completion":" Empty String | | string | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { string } = outputs;\n string.next(\"\");\n}###"}
{"prompt":"Round Robin output distributor\n\n###\n\n","completion":" Round Robin 3 | value | r1,r2,r3 | | value\nfunction (inputs, outputs, adv) {\n const { state } = adv;\n const { r1, r2, r3 } = outputs;\n const curr = state.get(\"curr\") || 0;\n\n const o = [r1, r2, r3][curr];\n\n const nextCurr = (curr + 1) % 3;\n\n o.next(inputs.item);\n state.set(\"curr\", nextCurr);\n }###"}
{"prompt":"Distribute values in a round-robin fashion\n\n###\n\n","completion":" Round Robin 3 | value | r1,r2,r3 | | value\nfunction ({ item }, { out1, out2, out3 }) {\n const outputs = [out1, out2, out3];\n let curr = 0;\n\n return function () {\n const o = outputs[curr];\n o.next(item);\n curr = (curr + 1) % 3;\n };\n}###"}
{"prompt":"A part that distributes values equally to three outputs\n\n###\n\n","completion":" Round Robin 3 | value | r1,r2,r3 | | value\nfunction (inputs, outputs, adv) {\n const { state } = adv;\n const { r1, r2, r3 } = outputs;\n const curr = state.get(\"curr\") || 0;\n\n const o = [r1, r2, r3][curr];\n\n const nextCurr = (curr + 1) % 3;\n\n o.next(inputs.item);\n state.set(\"curr\", nextCurr);\n }###"}
{"prompt":"A component that cycles through three outputs to distribute values\n\n###\n\n","completion":" Round Robin 3 | value | r1,r2,r3 | | value\nfunction ({ item }, { out1, out2, out3 }) {\n const outputs = [out1, out2, out3];\n let curr = 0;\n\n return function () {\n const o = outputs[curr];\n o.next(item);\n curr = (curr + 1) % 3;\n };\n}###"}
{"prompt":"Alternate between two outputs\n\n###\n\n","completion":" Round Robin 2 | value | r1,r2 | | value\nfunction (inputs, outputs, adv) {\n const { state } = adv;\n const { r1, r2 } = outputs;\n const curr = state.get(\"curr\") || 0;\n\n const o = [r1, r2][curr];\n\n const nextCurr = (curr + 1) % 2;\n\n o.next(inputs.item);\n state.set(\"curr\", nextCurr);\n }###"}
{"prompt":"Round Robin output\n\n###\n\n","completion":" Round Robin 2 | value | r1,r2 | | value\nfunction ({ item }, { output1, output2 }) {\n const { state } = adv;\n const curr = state.get('curr') || 0;\n\n const o = [output1, output2][curr];\n\n const nextCurr = (curr + 1) % 2;\n\n o.next(item);\n state.set('curr', nextCurr);\n}###"}
{"prompt":"Switch between two outputs\n\n###\n\n","completion":" Round Robin 2 | value | r1,r2 | | value\nfunction (inputs, outputs, adv) {\n const { state } = adv;\n const { r1, r2 } = outputs;\n const curr = state.get(\"curr\") || 0;\n\n const o = [r1, r2][curr];\n\n const nextCurr = (curr + 1) % 2;\n\n o.next(inputs.item);\n state.set(\"curr\", nextCurr);\n }###"}
{"prompt":"Output to two destinations in turns\n\n###\n\n","completion":" Round Robin 2 | value | r1,r2 | | value\nfunction ({ item }, { output1, output2 }) {\n const { state } = adv;\n const curr = state.get('curr') || 0;\n\n const o = [output1, output2][curr];\n\n const nextCurr = (curr + 1) % 2;\n\n o.next(item);\n state.set('curr', nextCurr);\n}###"}
{"prompt":"Round Robin output distributor\n\n###\n\n","completion":" Round Robin 4 | value | r1,r2,r3,r4 | | value\nfunction (inputs, outputs, adv) {\n const { state } = adv;\n const { r1, r2, r3, r4 } = outputs;\n const curr = state.get(\"curr\") || 0;\n\n const o = [r1, r2, r3, r4][curr];\n\n const nextCurr = (curr + 1) % 4;\n\n o.next(inputs.item);\n state.set(\"curr\", nextCurr);\n }###"}
{"prompt":"Distribute values in a round-robin fashion\n\n###\n\n","completion":" Round Robin 4 | value | r1,r2,r3,r4 | | value\nfunction (inpt, out1, out2, out3, out4) {\n let curr = 0;\n return function (value) {\n const o = [out1, out2, out3, out4][curr];\n o.next(value);\n curr = (curr + 1) % 4;\n };\n}###"}
{"prompt":"A part that distributes values equally to 4 outputs\n\n###\n\n","completion":" Round Robin 4 | value | r1,r2,r3,r4 | | value\nfunction (inputs, outputs, adv) {\n const { state } = adv;\n const { r1, r2, r3, r4 } = outputs;\n const curr = state.get(\"curr\") || 0;\n\n const o = [r1, r2, r3, r4][curr];\n\n const nextCurr = (curr + 1) % 4;\n\n o.next(inputs.item);\n state.set(\"curr\", nextCurr);\n }###"}
{"prompt":"A component that cycles through 4 outputs to distribute values\n\n###\n\n","completion":" Round Robin 4 | value | r1,r2,r3,r4 | | value\nfunction (inpt, out1, out2, out3, out4) {\n let curr = 0;\n return function (value) {\n const o = [out1, out2, out3, out4][curr];\n o.next(value);\n curr = (curr + 1) % 4;\n };\n}###"}
{"prompt":"Publish a value to a channel\n\n###\n\n","completion":" Publish | key,value | | IMPLICIT | NONE\nfunction (inputs, _, adv) {\n \/\/ magic here\n const nsKey = `${adv.ancestorsInsIds}__${inputs.key}`;\n\n PubSub.publish(nsKey, inputs.value);\n }###"}
{"prompt":"Send data to a channel\n\n###\n\n","completion":" Publish | key,value | | IMPLICIT | NONE\nfunction ({channel, data}, _, adv) {\n const nsKey = `${adv.ancestorsInsIds}__${channel}`;\n\n PubSub.publish(nsKey, data);\n }###"}
{"prompt":"Publish data to a channel\n\n###\n\n","completion":" Publish | key,value | | IMPLICIT | NONE\nfunction (inputs, _, adv) {\n \/\/ magic here\n const nsKey = `${adv.ancestorsInsIds}__${inputs.key}`;\n\n PubSub.publish(nsKey, inputs.value);\n }###"}
{"prompt":"Broadcast data to a channel\n\n###\n\n","completion":" Publish | key,value | | IMPLICIT | NONE\nfunction ({channel, data}, _, adv) {\n const nsKey = `${adv.ancestorsInsIds}__${channel}`;\n\n PubSub.publish(nsKey, data);\n }###"}
{"prompt":"Subscribe to a PubSub channel\n\n###\n\n","completion":" Subscribe | key,initial | value | | NONE\nfunction (inputs, outputs, adv) {\n const { value } = outputs;\n const nsKey = `${adv.ancestorsInsIds}__${inputs.key}`;\n const token = PubSub.subscribe(nsKey, (_, data) => {\n value.next(data);\n });\n\n if (typeof inputs.initial !== \"undefined\") {\n value.next(inputs.initial);\n }\n\n adv.onCleanup(() => {\n PubSub.unsubscribe(token);\n });\n }###"}
{"prompt":"Subscribe to a channel and receive updates\n\n###\n\n","completion":" Subscribe | key,initial | value | | NONE\nfunction (inputs, outputs, adv) {\n const { value } = outputs;\n const channelName = `${adv.ancestorsInsIds}__${inputs.channel}`;\n const token = PubSub.subscribe(channelName, (_, data) => {\n value.next(data);\n });\n\n if (typeof inputs.initial !== \"undefined\") {\n value.next(inputs.initial);\n }\n\n adv.onCleanup(() => {\n PubSub.unsubscribe(token);\n });\n }###"}
{"prompt":"Subscribe to a channel for updates\n\n###\n\n","completion":" Subscribe | key,initial | value | | NONE\nfunction (inputs, outputs, adv) {\n const { value } = outputs;\n const nsKey = `${adv.ancestorsInsIds}__${inputs.key}`;\n const token = PubSub.subscribe(nsKey, (_, data) => {\n value.next(data);\n });\n\n if (typeof inputs.initial !== \"undefined\") {\n value.next(inputs.initial);\n }\n\n adv.onCleanup(() => {\n PubSub.unsubscribe(token);\n });\n }###"}
{"prompt":"Subscribe to a channel and receive notifications\n\n###\n\n","completion":" Subscribe | key,initial | value | | NONE\nfunction (inputs, outputs, adv) {\n const { value } = outputs;\n const channelName = `${adv.ancestorsInsIds}__${inputs.channel}`;\n const token = PubSub.subscribe(channelName, (_, data) => {\n value.next(data);\n });\n\n if (typeof inputs.initial !== \"undefined\") {\n value.next(inputs.initial);\n }\n\n adv.onCleanup(() => {\n PubSub.unsubscribe(token);\n });\n }###"}
{"prompt":"Split boolean values\n\n###\n\n","completion":" Boolean Split | value,trueValue,falseValue | true,false | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { true: trueOutput, false: falseOutput } = outputs;\n const { value, trueValue, falseValue } = inputs;\n if (value) {\n trueOutput.next(trueValue ?? true);\n } else {\n falseOutput.next(falseValue ?? false);\n }\n }###"}
{"prompt":"Split true\/false values\n\n###\n\n","completion":" Boolean Split | value,trueValue,falseValue | true,false | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { trueOutput, falseOutput } = outputData;\n const { value, trueValue, falseValue } = inputData;\n if (value) {\n trueOutput.next(trueValue ?? true);\n } else {\n falseOutput.next(falseValue ?? false);\n }\n}###"}
{"prompt":"Boolean value splitter\n\n###\n\n","completion":" Boolean Split | value,trueValue,falseValue | true,false | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { true: trueOutput, false: falseOutput } = outputs;\n const { value, trueValue, falseValue } = inputs;\n if (value) {\n trueOutput.next(trueValue ?? true);\n } else {\n falseOutput.next(falseValue ?? false);\n }\n }###"}
{"prompt":"Split values based on boolean\n\n###\n\n","completion":" Boolean Split | value,trueValue,falseValue | true,false | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { trueOutput, falseOutput } = outputData;\n const { value, trueValue, falseValue } = inputData;\n if (value) {\n trueOutput.next(trueValue ?? true);\n } else {\n falseOutput.next(falseValue ?? false);\n }\n}###"}
{"prompt":"Trigger-based emitter\n\n###\n\n","completion":" Emit on Trigger | value,trigger | result | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { result } = outputs;\n const { value, trigger } = inputs;\n if (trigger !== undefined) {\n result.next(value);\n }\n }###"}
{"prompt":"Emit value on trigger\n\n###\n\n","completion":" Emit on Trigger | value,trigger | result | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { result } = outputData;\n const { value, trigger } = inputData;\n if (trigger !== undefined) {\n result.next(value);\n }\n}###"}
{"prompt":"Part that emits value on trigger\n\n###\n\n","completion":" Emit on Trigger | value,trigger | result | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { result } = outputs;\n const { value, trigger } = inputs;\n if (trigger !== undefined) {\n result.next(value);\n }\n }###"}
{"prompt":"Value emitter triggered by input\n\n###\n\n","completion":" Emit on Trigger | value,trigger | result | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { result } = outputData;\n const { value, trigger } = inputData;\n if (trigger !== undefined) {\n result.next(value);\n }\n}###"}
{"prompt":"A part that routes values to different outputs\n\n###\n\n","completion":" Switch 3 | value,firstCase,secondCase,thirdCase,outputValue | first,second,third,default | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const {\n first,\n second,\n third,\n default: defaultOutput,\n outputValue,\n } = outputs;\n const { value, firstCase, secondCase, thirdCase } = inputs;\n if (value === firstCase) {\n first.next(outputValue ?? value);\n } else if (value === secondCase) {\n second.next(outputValue ?? value);\n } else if (value === thirdCase) {\n third.next(outputValue ?? value);\n } else {\n defaultOutput.next(outputValue ?? value);\n }\n }###"}
{"prompt":"Route values to different outputs\n\n###\n\n","completion":" Switch 3 | value,firstCase,secondCase,thirdCase,outputValue | first,second,third,default | IMPLICIT | NONE\nfunction ({ value, case1, case2, case3, output }, { case1Output, case2Output, case3Output, defaultOutput }) {\n if (value === case1) {\n case1Output.next(output);\n } else if (value === case2) {\n case2Output.next(output);\n } else if (value === case3) {\n case3Output.next(output);\n } else {\n defaultOutput.next(output);\n }\n}###"}
{"prompt":"Switch between different output values\n\n###\n\n","completion":" Switch 3 | value,firstCase,secondCase,thirdCase,outputValue | first,second,third,default | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const {\n first,\n second,\n third,\n default: defaultOutput,\n outputValue,\n } = outputs;\n const { value, firstCase, secondCase, thirdCase } = inputs;\n if (value === firstCase) {\n first.next(outputValue ?? value);\n } else if (value === secondCase) {\n second.next(outputValue ?? value);\n } else if (value === thirdCase) {\n third.next(outputValue ?? value);\n } else {\n defaultOutput.next(outputValue ?? value);\n }\n }###"}
{"prompt":"A part that routes values based on conditions\n\n###\n\n","completion":" Switch 3 | value,firstCase,secondCase,thirdCase,outputValue | first,second,third,default | IMPLICIT | NONE\nfunction ({ value, case1, case2, case3, output }, { case1Output, case2Output, case3Output, defaultOutput }) {\n if (value === case1) {\n case1Output.next(output);\n } else if (value === case2) {\n case2Output.next(output);\n } else if (value === case3) {\n case3Output.next(output);\n } else {\n defaultOutput.next(output);\n }\n}###"}
{"prompt":"A part that switches between two cases\n\n###\n\n","completion":" Switch 2 | value,firstCase,secondCase,outputValue | first,second,default | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { first, second, default: defaultOutput, outputValue } = outputs;\n const { value, firstCase, secondCase } = inputs;\n if (value === firstCase) {\n first.next(outputValue ?? value);\n } else if (value === secondCase) {\n second.next(outputValue ?? value);\n } else {\n defaultOutput.next(outputValue ?? value);\n }\n }###"}
{"prompt":"Switch between two cases\n\n###\n\n","completion":" Switch 2 | value,firstCase,secondCase,outputValue | first,second,default | IMPLICIT | NONE\nfunction ({ value, firstCase, secondCase, outputValue }, { first, second, defaultOutput }) {\n if (value === firstCase) {\n first.next(outputValue ?? value);\n } else if (value === secondCase) {\n second.next(outputValue ?? value);\n } else {\n defaultOutput.next(outputValue ?? value);\n }\n }###"}
{"prompt":"A node that routes values based on two cases\n\n###\n\n","completion":" Switch 2 | value,firstCase,secondCase,outputValue | first,second,default | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { first, second, default: defaultOutput, outputValue } = outputs;\n const { value, firstCase, secondCase } = inputs;\n if (value === firstCase) {\n first.next(outputValue ?? value);\n } else if (value === secondCase) {\n second.next(outputValue ?? value);\n } else {\n defaultOutput.next(outputValue ?? value);\n }\n }###"}
{"prompt":"A node that routes values based on two cases with a default output\n\n###\n\n","completion":" Switch 2 | value,firstCase,secondCase,outputValue | first,second,default | IMPLICIT | NONE\nfunction ({ value, firstCase, secondCase, outputValue }, { first, second, defaultOutput }) {\n if (value === firstCase) {\n first.next(outputValue ?? value);\n } else if (value === secondCase) {\n second.next(outputValue ?? value);\n } else {\n defaultOutput.next(outputValue ?? value);\n }\n }###"}
{"prompt":"Delay values\n\n###\n\n","completion":" Delay | value,delay | delayedValue | IMPLICIT | NONE\nasync ({ value, delay }, { delayedValue }) => {\n await new Promise((resolve) => setTimeout(resolve, delay));\n delayedValue.next(value);\n }###"}
{"prompt":"Delay input by specified time\n\n###\n\n","completion":" Delay | value,delay | delayedValue | IMPLICIT | NONE\nfunction (inputDelay, outputDelayedValue, adv) {\n const { value, delay } = inputDelay;\n const { delayedValue } = outputDelayedValue;\n\n const timer = adv.state.get(\"timer\");\n if (timer) {\n clearTimeout(timer);\n }\n\n const newTimer = setTimeout(() => {\n delayedValue.next(value);\n }, delay);\n\n adv.state.set(\"timer\", newTimer);\n\n adv.onCleanup(() => {\n clearTimeout(timer);\n });\n }###"}
{"prompt":"Delay input values\n\n###\n\n","completion":" Delay | value,delay | delayedValue | IMPLICIT | NONE\nasync ({ value, delay }, { delayedValue }) => {\n await new Promise((resolve) => setTimeout(resolve, delay));\n delayedValue.next(value);\n }###"}
{"prompt":"Delay input values by specified time\n\n###\n\n","completion":" Delay | value,delay | delayedValue | IMPLICIT | NONE\nfunction (inputDelay, outputDelayedValue, adv) {\n const { value, delay } = inputDelay;\n const { delayedValue } = outputDelayedValue;\n\n const timer = adv.state.get(\"timer\");\n if (timer) {\n clearTimeout(timer);\n }\n\n const newTimer = setTimeout(() => {\n delayedValue.next(value);\n }, delay);\n\n adv.state.set(\"timer\", newTimer);\n\n adv.onCleanup(() => {\n clearTimeout(timer);\n });\n }###"}
{"prompt":"A part that emits a value at a fixed interval\n\n###\n\n","completion":" Interval | value,interval | value | | value,interval\n(inputs, outputs, adv) => {\n if (adv.state.get(\"timer\")) {\n clearInterval(adv.state.get(\"timer\"));\n }\n\n const timer = setInterval(() => {\n outputs.value.next(inputs.value);\n }, inputs.interval);\n\n adv.state.set(\"timer\", timer);\n\n adv.onCleanup(() => {\n clearInterval(timer);\n });\n }###"}
{"prompt":"Emit a value at a fixed interval\n\n###\n\n","completion":" Interval | value,interval | value | | value,interval\nfunction (input, output, adv) {\n const { val, int } = input;\n const { value } = output;\n let count = 0;\n const timer = setInterval(() => {\n value.next(count);\n count++;\n }, int);\n\n adv.state.set('timer', timer);\n\n adv.onCleanup(() => {\n clearInterval(timer);\n });\n}###"}
{"prompt":"Emit a value at a set interval\n\n###\n\n","completion":" Interval | value,interval | value | | value,interval\n(inputs, outputs, adv) => {\n if (adv.state.get(\"timer\")) {\n clearInterval(adv.state.get(\"timer\"));\n }\n\n const timer = setInterval(() => {\n outputs.value.next(inputs.value);\n }, inputs.interval);\n\n adv.state.set(\"timer\", timer);\n\n adv.onCleanup(() => {\n clearInterval(timer);\n });\n }###"}
{"prompt":"A part that repeatedly emits a value at a fixed interval\n\n###\n\n","completion":" Interval | value,interval | value | | value,interval\nfunction (input, output, adv) {\n const { val, int } = input;\n const { value } = output;\n let count = 0;\n const timer = setInterval(() => {\n value.next(count);\n count++;\n }, int);\n\n adv.state.set('timer', timer);\n\n adv.onCleanup(() => {\n clearInterval(timer);\n });\n}###"}
{"prompt":"Throttle incoming values\n\n###\n\n","completion":" Debounce | value,wait | result | result | value\nfunction (inputs, outputs, adv) {\n const { value, wait } = inputs;\n const { result } = outputs;\n\n const timer = adv.state.get(\"timer\");\n if (timer) {\n clearTimeout(timer);\n }\n\n const newTimer = setTimeout(() => {\n result.next(value);\n }, wait);\n\n adv.state.set(\"timer\", newTimer);\n\n adv.onCleanup(() => {\n clearTimeout(timer);\n });\n }###"}
{"prompt":"Limit incoming values to a certain rate\n\n###\n\n","completion":" Debounce | value,wait | result | result | value\nfunction (inputData, outputData, state) {\n const { incomingValue, delay } = inputData;\n const { outgoingValue } = outputData;\n\n const timer = state.get('timer');\n if (timer) {\n clearTimeout(timer);\n }\n\n const newTimer = setTimeout(() => {\n outgoingValue.next(incomingValue);\n }, delay);\n\n state.set('timer', newTimer);\n\n state.onCleanup(() => {\n clearTimeout(timer);\n });\n}###"}
{"prompt":"Delay incoming values\n\n###\n\n","completion":" Debounce | value,wait | result | result | value\nfunction (inputs, outputs, adv) {\n const { value, wait } = inputs;\n const { result } = outputs;\n\n const timer = adv.state.get(\"timer\");\n if (timer) {\n clearTimeout(timer);\n }\n\n const newTimer = setTimeout(() => {\n result.next(value);\n }, wait);\n\n adv.state.set(\"timer\", newTimer);\n\n adv.onCleanup(() => {\n clearTimeout(timer);\n });\n }###"}
{"prompt":"Control incoming values\n\n###\n\n","completion":" Debounce | value,wait | result | result | value\nfunction (inputData, outputData, state) {\n const { incomingValue, delay } = inputData;\n const { outgoingValue } = outputData;\n\n const timer = state.get('timer');\n if (timer) {\n clearTimeout(timer);\n }\n\n const newTimer = setTimeout(() => {\n outgoingValue.next(incomingValue);\n }, delay);\n\n state.set('timer', newTimer);\n\n state.onCleanup(() => {\n clearTimeout(timer);\n });\n}###"}
{"prompt":"Limit input frequency\n\n###\n\n","completion":" Throttle | value,wait | result | result | value\nfunction (inputs, outputs, adv) {\n const { value, wait } = inputs;\n const { result } = outputs;\n\n const timer = adv.state.get(\"timer\");\n if (timer) {\n adv.onError(new ThrottleError(value));\n return;\n } else {\n result.next(value);\n const newTimer = setTimeout(() => {\n adv.state.set(\"timer\", null);\n }, wait);\n adv.state.set(\"timer\", newTimer);\n }\n }###"}
{"prompt":"Control input rate\n\n###\n\n","completion":" Throttle | value,wait | result | result | value\nfunction (inputValues, outputValues, state) {\n const { input, waitTime } = inputValues;\n const { output } = outputValues;\n \n const timer = state.get('timer');\n if (timer) {\n state.set('lastInput', input);\n return;\n }\n \n output.next(input);\n const newTimer = setTimeout(() => {\n state.set('timer', null);\n const lastInput = state.get('lastInput');\n if (lastInput) {\n output.next(lastInput);\n state.set('lastInput', null);\n }\n }, waitTime);\n state.set('timer', newTimer);\n}###"}
{"prompt":"Throttle input values\n\n###\n\n","completion":" Throttle | value,wait | result | result | value\nfunction (inputs, outputs, adv) {\n const { value, wait } = inputs;\n const { result } = outputs;\n\n const timer = adv.state.get(\"timer\");\n if (timer) {\n adv.onError(new ThrottleError(value));\n return;\n } else {\n result.next(value);\n const newTimer = setTimeout(() => {\n adv.state.set(\"timer\", null);\n }, wait);\n adv.state.set(\"timer\", newTimer);\n }\n }###"}
{"prompt":"Limit input speed\n\n###\n\n","completion":" Throttle | value,wait | result | result | value\nfunction (inputValues, outputValues, state) {\n const { input, waitTime } = inputValues;\n const { output } = outputValues;\n \n const timer = state.get('timer');\n if (timer) {\n state.set('lastInput', input);\n return;\n }\n \n output.next(input);\n const newTimer = setTimeout(() => {\n state.set('timer', null);\n const lastInput = state.get('lastInput');\n if (lastInput) {\n output.next(lastInput);\n state.set('lastInput', null);\n }\n }, waitTime);\n state.set('timer', newTimer);\n}###"}
{"prompt":"Compare two values\n\n###\n\n","completion":" Equals (Bool) | a,b | result | IMPLICIT | NONE\n({ a, b }, { result }) => result.next(a === b)###"}
{"prompt":"Check if two values are equal\n\n###\n\n","completion":" Equals (Bool) | a,b | result | IMPLICIT | NONE\nfunction (input, output, adv) {\n const { firstValue, secondValue } = input;\n const { result } = output;\n result.next(firstValue === secondValue);\n}###"}
{"prompt":"Boolean comparison\n\n###\n\n","completion":" Equals (Bool) | a,b | result | IMPLICIT | NONE\n({ a, b }, { result }) => result.next(a === b)###"}
{"prompt":"Determine if two values are equal\n\n###\n\n","completion":" Equals (Bool) | a,b | result | IMPLICIT | NONE\nfunction (input, output, adv) {\n const { firstValue, secondValue } = input;\n const { result } = output;\n result.next(firstValue === secondValue);\n}###"}
{"prompt":"Compare two values\n\n###\n\n","completion":" Equals | a,b | true,false | IMPLICIT | NONE\n(inputs, outputs) => {\n const { a, b } = inputs;\n const { true: trueOutput, false: falseOutput } = outputs;\n\n if (a === b) {\n trueOutput.next(a);\n } else {\n falseOutput.next(a);\n }\n }###"}
{"prompt":"Check if two values are equal\n\n###\n\n","completion":" Equals | a,b | true,false | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { value1, value2 } = inputData;\n const { true: trueOutput, false: falseOutput } = outputData;\n\n if (value1 === value2) {\n trueOutput.next(value1);\n } else {\n falseOutput.next(value1);\n }\n}###"}
{"prompt":"Equality checker\n\n###\n\n","completion":" Equals | a,b | true,false | IMPLICIT | NONE\n(inputs, outputs) => {\n const { a, b } = inputs;\n const { true: trueOutput, false: falseOutput } = outputs;\n\n if (a === b) {\n trueOutput.next(a);\n } else {\n falseOutput.next(a);\n }\n }###"}
{"prompt":"Determine if two values are equal\n\n###\n\n","completion":" Equals | a,b | true,false | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { value1, value2 } = inputData;\n const { true: trueOutput, false: falseOutput } = outputData;\n\n if (value1 === value2) {\n trueOutput.next(value1);\n } else {\n falseOutput.next(value1);\n }\n}###"}
{"prompt":"Check if list is empty\n\n###\n\n","completion":" List Is Empty | list | isEmpty | IMPLICIT | NONE\n({ list }, { isEmpty }) => isEmpty.next(list.length === 0)###"}
{"prompt":"Detect empty list\n\n###\n\n","completion":" List Is Empty | list | isEmpty | IMPLICIT | NONE\nfunction ({ myList }, { isListEmpty }) {\n return isListEmpty.next(myList.length === 0);\n}###"}
{"prompt":"List emptiness checker\n\n###\n\n","completion":" List Is Empty | list | isEmpty | IMPLICIT | NONE\n({ list }, { isEmpty }) => isEmpty.next(list.length === 0)###"}
{"prompt":"Determine if list is empty\n\n###\n\n","completion":" List Is Empty | list | isEmpty | IMPLICIT | NONE\nfunction ({ myList }, { isListEmpty }) {\n return isListEmpty.next(myList.length === 0);\n}###"}
{"prompt":"Get element from list\n\n###\n\n","completion":" Get List Element | list,index | element | IMPLICIT | NONE\n({ list, index }, { element }) => element.next(list[index])###"}
{"prompt":"Retrieve item from list\n\n###\n\n","completion":" Get List Element | list,index | element | IMPLICIT | NONE\nfunction ({ myList, myIndex }, { myElement }) { myElement.next(myList[myIndex]) }###"}
{"prompt":"Get item at index\n\n###\n\n","completion":" Get List Element | list,index | element | IMPLICIT | NONE\n({ list, index }, { element }) => element.next(list[index])###"}
{"prompt":"Get specific element from list\n\n###\n\n","completion":" Get List Element | list,index | element | IMPLICIT | NONE\nfunction ({ myList, myIndex }, { myElement }) { myElement.next(myList[myIndex]) }###"}
{"prompt":"Repeat a value multiple times\n\n###\n\n","completion":" Repeat | value,times | list | IMPLICIT | NONE\n({ value, times }, { list }) => {\n const result = [];\n for (let i = 0; i < times; i++) {\n result.push(value);\n }\n return list.next(result);\n }###"}
{"prompt":"Create a list with repeated values\n\n###\n\n","completion":" Repeat | value,times | list | IMPLICIT | NONE\nfunction (inputValues, outputValues, adv) {\n const { inputValue, repeatTimes } = inputValues;\n const { outputList } = outputValues;\n const repeatedValues = Array(repeatTimes).fill(inputValue);\n outputList.next(repeatedValues);\n}###"}
{"prompt":"Repeat input value a specified number of times\n\n###\n\n","completion":" Repeat | value,times | list | IMPLICIT | NONE\n({ value, times }, { list }) => {\n const result = [];\n for (let i = 0; i < times; i++) {\n result.push(value);\n }\n return list.next(result);\n }###"}
{"prompt":"Generate a list with repeated values\n\n###\n\n","completion":" Repeat | value,times | list | IMPLICIT | NONE\nfunction (inputValues, outputValues, adv) {\n const { inputValue, repeatTimes } = inputValues;\n const { outputList } = outputValues;\n const repeatedValues = Array(repeatTimes).fill(inputValue);\n outputList.next(repeatedValues);\n}###"}
{"prompt":"Create a list from two values\n\n###\n\n","completion":" List From 2 | value1,value2 | list | IMPLICIT | NONE\n({ value1, value2 }, { list }) => list.next([value1, value2])###"}
{"prompt":"Combine two values into a list\n\n###\n\n","completion":" List From 2 | value1,value2 | list | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { value1, value2 } = inputData;\n const { list } = outputData;\n\n list.next([value1, value2]);\n}###"}
{"prompt":"List with two values\n\n###\n\n","completion":" List From 2 | value1,value2 | list | IMPLICIT | NONE\n({ value1, value2 }, { list }) => list.next([value1, value2])###"}
{"prompt":"Create a list with two values\n\n###\n\n","completion":" List From 2 | value1,value2 | list | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { value1, value2 } = inputData;\n const { list } = outputData;\n\n list.next([value1, value2]);\n}###"}
{"prompt":"Create a list from 3 values\n\n###\n\n","completion":" List From 3 | value1,value2,value3 | list | IMPLICIT | NONE\n({ value1, value2, value3 }, { list }) =>\n list.next([value1, value2, value3])###"}
{"prompt":"Convert 3 values to a list\n\n###\n\n","completion":" List From 3 | value1,value2,value3 | list | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { value1, value2, value3 } = inputData;\n const { list } = outputData;\n list.next([value1, value2, value3]);\n}###"}
{"prompt":"List of 3 values\n\n###\n\n","completion":" List From 3 | value1,value2,value3 | list | IMPLICIT | NONE\n({ value1, value2, value3 }, { list }) =>\n list.next([value1, value2, value3])###"}
{"prompt":"Create a list with 3 values\n\n###\n\n","completion":" List From 3 | value1,value2,value3 | list | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { value1, value2, value3 } = inputData;\n const { list } = outputData;\n list.next([value1, value2, value3]);\n}###"}
{"prompt":"Create a list from values\n\n###\n\n","completion":" List From 4 | value1,value2,value3,value4 | list | IMPLICIT | NONE\n({ value1, value2, value3, value4 }, { list }) =>\n list.next([value1, value2, value3, value4])###"}
{"prompt":"Convert values to a list\n\n###\n\n","completion":" List From 4 | value1,value2,value3,value4 | list | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { val1, val2, val3, val4 } = inputs;\n const { list } = outputs;\n\n const newList = [val1, val2, val3, val4];\n list.next(newList);\n}###"}
{"prompt":"Combine values into a list\n\n###\n\n","completion":" List From 4 | value1,value2,value3,value4 | list | IMPLICIT | NONE\n({ value1, value2, value3, value4 }, { list }) =>\n list.next([value1, value2, value3, value4])###"}
{"prompt":"Aggregate values into a list\n\n###\n\n","completion":" List From 4 | value1,value2,value3,value4 | list | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { val1, val2, val3, val4 } = inputs;\n const { list } = outputs;\n\n const newList = [val1, val2, val3, val4];\n list.next(newList);\n}###"}
{"prompt":"Create a list from 5 values\n\n###\n\n","completion":" List From 5 | value1,value2,value3,value4,value5 | list | IMPLICIT | NONE\n({ value1, value2, value3, value4, value5 }, { list }) =>\n list.next([value1, value2, value3, value4, value5])###"}
{"prompt":"List creator\n\n###\n\n","completion":" List From 5 | value1,value2,value3,value4,value5 | list | IMPLICIT | NONE\nfunction ({ val1, val2, val3, val4, val5 }, { outputList }) { outputList.next([val1, val2, val3, val4, val5]); }###"}
{"prompt":"Part that creates a list\n\n###\n\n","completion":" List From 5 | value1,value2,value3,value4,value5 | list | IMPLICIT | NONE\n({ value1, value2, value3, value4, value5 }, { list }) =>\n list.next([value1, value2, value3, value4, value5])###"}
{"prompt":"A node that generates a list from 5 values\n\n###\n\n","completion":" List From 5 | value1,value2,value3,value4,value5 | list | IMPLICIT | NONE\nfunction ({ val1, val2, val3, val4, val5 }, { outputList }) { outputList.next([val1, val2, val3, val4, val5]); }###"}
{"prompt":"Combine two lists\n\n###\n\n","completion":" Concat Lists | list1,list2 | list | IMPLICIT | NONE\n({ list1, list2 }, { list }) => list.next([...list1, ...list2])###"}
{"prompt":"Concatenate two lists into one\n\n###\n\n","completion":" Concat Lists | list1,list2 | list | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { list1, list2 } = inputs;\n const { list } = outputs;\n\n list.next(list1.concat(list2));\n}###"}
{"prompt":"Merge two lists\n\n###\n\n","completion":" Concat Lists | list1,list2 | list | IMPLICIT | NONE\n({ list1, list2 }, { list }) => list.next([...list1, ...list2])###"}
{"prompt":"Join two lists together\n\n###\n\n","completion":" Concat Lists | list1,list2 | list | IMPLICIT | NONE\nfunction (inputs, outputs) {\n const { list1, list2 } = inputs;\n const { list } = outputs;\n\n list.next(list1.concat(list2));\n}###"}
{"prompt":"Reverse a list\n\n###\n\n","completion":" Reverse | list | reversed | IMPLICIT | NONE\n({ list }, { reversed }) => reversed.next(list.reverse())###"}
{"prompt":"Reverse order of list\n\n###\n\n","completion":" Reverse | list | reversed | IMPLICIT | NONE\nfunction ({ inputList }, { outputReversed }) {\n const { list } = inputList;\n const { reversed } = outputReversed;\n\n const reversedList = list.reverse();\n reversed.next(reversedList);\n}###"}
{"prompt":"Create reversed list\n\n###\n\n","completion":" Reverse | list | reversed | IMPLICIT | NONE\n({ list }, { reversed }) => reversed.next(list.reverse())###"}
{"prompt":"Generate reversed list\n\n###\n\n","completion":" Reverse | list | reversed | IMPLICIT | NONE\nfunction ({ inputList }, { outputReversed }) {\n const { list } = inputList;\n const { reversed } = outputReversed;\n\n const reversedList = list.reverse();\n reversed.next(reversedList);\n}###"}
{"prompt":"Split list into head and rest\n\n###\n\n","completion":" Head and rest | list | head,rest | IMPLICIT | NONE\n(inputs, outputs) => {\n const { list } = inputs;\n const { head, rest } = outputs;\n head.next(list[0]);\n rest.next(list.slice(1));\n }###"}
{"prompt":"Extract first element and remaining elements of a list\n\n###\n\n","completion":" Head and rest | list | head,rest | IMPLICIT | NONE\nfunction (inputList, outputHead, outputRest) {\n const [head, ...rest] = inputList;\n outputHead.next(head);\n outputRest.next(rest);\n}###"}
{"prompt":"Separate list into first element and the rest\n\n###\n\n","completion":" Head and rest | list | head,rest | IMPLICIT | NONE\n(inputs, outputs) => {\n const { list } = inputs;\n const { head, rest } = outputs;\n head.next(list[0]);\n rest.next(list.slice(1));\n }###"}
{"prompt":"Get first element and remaining elements of a list\n\n###\n\n","completion":" Head and rest | list | head,rest | IMPLICIT | NONE\nfunction (inputList, outputHead, outputRest) {\n const [head, ...rest] = inputList;\n outputHead.next(head);\n outputRest.next(rest);\n}###"}
{"prompt":"Split a pair into two items\n\n###\n\n","completion":" Split Pair | pair | item1,item2 | IMPLICIT | NONE\n(inputs, outputs) => {\n const { pair } = inputs;\n const { item1, item2 } = outputs;\n item1.next(pair[0]);\n item2.next(pair[1]);\n }###"}
{"prompt":"Separate a pair into two values\n\n###\n\n","completion":" Split Pair | pair | item1,item2 | IMPLICIT | NONE\nfunction ({ pair }, { item1, item2 }) {\n const [first, second] = pair;\n item1.next(first);\n item2.next(second);\n}###"}
{"prompt":"Extract two values from a pair\n\n###\n\n","completion":" Split Pair | pair | item1,item2 | IMPLICIT | NONE\n(inputs, outputs) => {\n const { pair } = inputs;\n const { item1, item2 } = outputs;\n item1.next(pair[0]);\n item2.next(pair[1]);\n }###"}
{"prompt":"Split a pair into two separate items\n\n###\n\n","completion":" Split Pair | pair | item1,item2 | IMPLICIT | NONE\nfunction ({ pair }, { item1, item2 }) {\n const [first, second] = pair;\n item1.next(first);\n item2.next(second);\n}###"}
{"prompt":"Split a list into three items\n\n###\n\n","completion":" Split Triple | triple | item1,item2,item3 | IMPLICIT | NONE\n(inputs, outputs) => {\n const { list } = inputs;\n const { item1, item2, item3 } = outputs;\n item1.next(list[0]);\n item2.next(list[1]);\n item3.next(list[2]);\n }###"}
{"prompt":"Split list into 3 outputs\n\n###\n\n","completion":" Split Triple | triple | item1,item2,item3 | IMPLICIT | NONE\nfunction ({ triple }, { item1, item2, item3 }) {\n const [first, second, third] = triple;\n item1.next(first);\n item2.next(second);\n item3.next(third);\n }###"}
{"prompt":"A part that separates a list into 3 items\n\n###\n\n","completion":" Split Triple | triple | item1,item2,item3 | IMPLICIT | NONE\n(inputs, outputs) => {\n const { list } = inputs;\n const { item1, item2, item3 } = outputs;\n item1.next(list[0]);\n item2.next(list[1]);\n item3.next(list[2]);\n }###"}
{"prompt":"A function that takes a list and outputs 3 items\n\n###\n\n","completion":" Split Triple | triple | item1,item2,item3 | IMPLICIT | NONE\nfunction ({ triple }, { item1, item2, item3 }) {\n const [first, second, third] = triple;\n item1.next(first);\n item2.next(second);\n item3.next(third);\n }###"}
{"prompt":"Split a list into four items\n\n###\n\n","completion":" Split Quadruple | quadruple | item1,item2,item3,item4 | IMPLICIT | NONE\n(inputs, outputs) => {\n const { list } = inputs;\n const { item1, item2, item3, item4 } = outputs;\n item1.next(list[0]);\n item2.next(list[1]);\n item3.next(list[2]);\n item4.next(list[3]);\n }###"}
{"prompt":"Split list into 4 outputs\n\n###\n\n","completion":" Split Quadruple | quadruple | item1,item2,item3,item4 | IMPLICIT | NONE\nfunction ({quadruple}, {item1, item2, item3, item4}) {\n const [first, second, third, fourth] = quadruple;\n item1.next(first);\n item2.next(second);\n item3.next(third);\n item4.next(fourth);\n}###"}
{"prompt":"A part that separates a list into 4 items\n\n###\n\n","completion":" Split Quadruple | quadruple | item1,item2,item3,item4 | IMPLICIT | NONE\n(inputs, outputs) => {\n const { list } = inputs;\n const { item1, item2, item3, item4 } = outputs;\n item1.next(list[0]);\n item2.next(list[1]);\n item3.next(list[2]);\n item4.next(list[3]);\n }###"}
{"prompt":"A function that takes a list and outputs 4 items\n\n###\n\n","completion":" Split Quadruple | quadruple | item1,item2,item3,item4 | IMPLICIT | NONE\nfunction ({quadruple}, {item1, item2, item3, item4}) {\n const [first, second, third, fourth] = quadruple;\n item1.next(first);\n item2.next(second);\n item3.next(third);\n item4.next(fourth);\n}###"}
{"prompt":"Accumulate values until trigger\n\n###\n\n","completion":" Accumulate Values by Trigger | value,reset | accumulated | IMPLICIT | value,reset\n(inputs, outputs, adv) => {\n const { item, until } = inputs;\n const { r } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n\n if (typeof item !== \"undefined\") {\n list.push(item);\n state.set(\"list\", list);\n }\n\n if (typeof until !== \"undefined\") {\n r.next(list);\n }\n }###"}
{"prompt":"Collect values until trigger\n\n###\n\n","completion":" Accumulate Values by Trigger | value,reset | accumulated | IMPLICIT | value,reset\nfunction (inputs, outputs, adv) {\n const { val, reset } = inputs;\n const { acc } = outputs;\n const { state } = adv;\n\n let list = state.get('list') || [];\n\n if (typeof val !== 'undefined') {\n list.push(val);\n state.set('list', list);\n }\n\n if (reset) {\n state.set('list', []);\n }\n\n acc.next(list);\n}###"}
{"prompt":"Part that stores values until trigger\n\n###\n\n","completion":" Accumulate Values by Trigger | value,reset | accumulated | IMPLICIT | value,reset\n(inputs, outputs, adv) => {\n const { item, until } = inputs;\n const { r } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n\n if (typeof item !== \"undefined\") {\n list.push(item);\n state.set(\"list\", list);\n }\n\n if (typeof until !== \"undefined\") {\n r.next(list);\n }\n }###"}
{"prompt":"Store values until trigger event\n\n###\n\n","completion":" Accumulate Values by Trigger | value,reset | accumulated | IMPLICIT | value,reset\nfunction (inputs, outputs, adv) {\n const { val, reset } = inputs;\n const { acc } = outputs;\n const { state } = adv;\n\n let list = state.get('list') || [];\n\n if (typeof val !== 'undefined') {\n list.push(val);\n state.set('list', list);\n }\n\n if (reset) {\n state.set('list', []);\n }\n\n acc.next(list);\n}###"}
{"prompt":"Accumulate values over time\n\n###\n\n","completion":" Accumulate Values by Time | value,time | accumulated | IMPLICIT | value\n(inputs, outputs, adv) => {\n const { value, time } = inputs;\n const { accumulated } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n\n const bob = Date.now() % 1000;\n console.log(\"called\", inputs.value, inputs.time, bob);\n state.set(\"bob\", 2);\n console.log(Array.from(state.entries()));\n\n if (typeof value !== \"undefined\") {\n list.push(value);\n state.set(\"list\", list);\n }\n\n if (state.get(\"timeout\")) {\n clearTimeout(state.get(\"timeout\"));\n }\n\n const promise = new Promise<void>((resolve) => {\n state.set(\"resolve\", resolve);\n });\n\n state.set(\n \"timeout\",\n setTimeout(() => {\n console.log(\"emitting\", list, bob, Date.now() % 1000);\n accumulated.next(list);\n\n state.set(\"list\", []);\n const resolve = state.get(\"resolve\");\n if (!resolve) {\n throw new Error(\"resolve is undefined\");\n }\n resolve();\n }, time)\n );\n\n return promise;\n }###"}
{"prompt":"Collect values over a period\n\n###\n\n","completion":" Accumulate Values by Time | value,time | accumulated | IMPLICIT | value\nfunction (inputData, outputData, state) {\n const { value, time } = inputData;\n const { accumulated } = outputData;\n const { internalState } = state;\n\n let list = internalState.get('list') || [];\n\n if (typeof value !== 'undefined') {\n list.push(value);\n internalState.set('list', list);\n }\n\n if (internalState.get('timeout')) {\n clearTimeout(internalState.get('timeout'));\n }\n\n const promise = new Promise<void>((resolve) => {\n internalState.set('resolve', resolve);\n });\n\n internalState.set(\n 'timeout',\n setTimeout(() => {\n accumulated.next(list);\n\n internalState.set('list', []);\n const resolve = internalState.get('resolve');\n if (!resolve) {\n throw new Error('resolve is undefined');\n }\n resolve();\n }, time)\n );\n\n return promise;\n}###"}
{"prompt":"Aggregate values by time\n\n###\n\n","completion":" Accumulate Values by Time | value,time | accumulated | IMPLICIT | value\n(inputs, outputs, adv) => {\n const { value, time } = inputs;\n const { accumulated } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n\n const bob = Date.now() % 1000;\n console.log(\"called\", inputs.value, inputs.time, bob);\n state.set(\"bob\", 2);\n console.log(Array.from(state.entries()));\n\n if (typeof value !== \"undefined\") {\n list.push(value);\n state.set(\"list\", list);\n }\n\n if (state.get(\"timeout\")) {\n clearTimeout(state.get(\"timeout\"));\n }\n\n const promise = new Promise<void>((resolve) => {\n state.set(\"resolve\", resolve);\n });\n\n state.set(\n \"timeout\",\n setTimeout(() => {\n console.log(\"emitting\", list, bob, Date.now() % 1000);\n accumulated.next(list);\n\n state.set(\"list\", []);\n const resolve = state.get(\"resolve\");\n if (!resolve) {\n throw new Error(\"resolve is undefined\");\n }\n resolve();\n }, time)\n );\n\n return promise;\n }###"}
{"prompt":"Gather data over a set time\n\n###\n\n","completion":" Accumulate Values by Time | value,time | accumulated | IMPLICIT | value\nfunction (inputData, outputData, state) {\n const { value, time } = inputData;\n const { accumulated } = outputData;\n const { internalState } = state;\n\n let list = internalState.get('list') || [];\n\n if (typeof value !== 'undefined') {\n list.push(value);\n internalState.set('list', list);\n }\n\n if (internalState.get('timeout')) {\n clearTimeout(internalState.get('timeout'));\n }\n\n const promise = new Promise<void>((resolve) => {\n internalState.set('resolve', resolve);\n });\n\n internalState.set(\n 'timeout',\n setTimeout(() => {\n accumulated.next(list);\n\n internalState.set('list', []);\n const resolve = internalState.get('resolve');\n if (!resolve) {\n throw new Error('resolve is undefined');\n }\n resolve();\n }, time)\n );\n\n return promise;\n}###"}
{"prompt":"Count Values\n\n###\n\n","completion":" Accumulate Values by Count | value,count | accumulated | accumulated | value\n(inputs, outputs, adv) => {\n const { value, count } = inputs;\n const { accumulated } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n\n if (typeof value !== \"undefined\") {\n list.push(value);\n state.set(\"list\", list);\n }\n\n if (list.length >= count) {\n accumulated.next(list);\n }\n }###"}
{"prompt":"Accumulate by Count\n\n###\n\n","completion":" Accumulate Values by Count | value,count | accumulated | accumulated | value\nfunction (inputData, outputData, advData) {\n const { inputValue, countValue } = inputData;\n const { accumulatedValue } = outputData;\n const { state } = advData;\n\n let list = state.get(\"list\") || [];\n\n if (typeof inputValue !== \"undefined\") {\n list.push(inputValue);\n state.set(\"list\", list);\n }\n\n if (list.length >= countValue) {\n accumulatedValue.next(list);\n state.set(\"list\", []);\n }\n}###"}
{"prompt":"Collect Values\n\n###\n\n","completion":" Accumulate Values by Count | value,count | accumulated | accumulated | value\n(inputs, outputs, adv) => {\n const { value, count } = inputs;\n const { accumulated } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n\n if (typeof value !== \"undefined\") {\n list.push(value);\n state.set(\"list\", list);\n }\n\n if (list.length >= count) {\n accumulated.next(list);\n }\n }###"}
{"prompt":"Group Values\n\n###\n\n","completion":" Accumulate Values by Count | value,count | accumulated | accumulated | value\nfunction (inputData, outputData, advData) {\n const { inputValue, countValue } = inputData;\n const { accumulatedValue } = outputData;\n const { state } = advData;\n\n let list = state.get(\"list\") || [];\n\n if (typeof inputValue !== \"undefined\") {\n list.push(inputValue);\n state.set(\"list\", list);\n }\n\n if (list.length >= countValue) {\n accumulatedValue.next(list);\n state.set(\"list\", []);\n }\n}###"}
{"prompt":"Accumulate values by count\n\n###\n\n","completion":" Accumulate Some Values by Count | accept,ignore,count | accumulated,ignored | IMPLICIT | accept,ignore\n(inputs, outputs, adv) => {\n const { accept, ignore, count } = inputs;\n const { accumulated, ignored } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n let ignoredList = state.get(\"ignored\") || [];\n\n if (typeof accept !== \"undefined\") {\n list.push(accept);\n state.set(\"list\", list);\n }\n\n if (typeof ignore !== \"undefined\") {\n ignoredList.push(ignore);\n state.set(\"ignored\", ignored);\n }\n\n if (list.length + ignoredList.length >= count) {\n accumulated.next(list);\n ignored.next(ignored);\n }\n }###"}
{"prompt":"Count values and output accumulated and ignored\n\n###\n\n","completion":" Accumulate Some Values by Count | accept,ignore,count | accumulated,ignored | IMPLICIT | accept,ignore\nfunction (inputData, outputData, advData) {\n const { acceptInput, ignoreInput, countInput } = inputData;\n const { accumulatedOutput, ignoredOutput } = outputData;\n const { state } = advData;\n\n let list = state.get('list') || [];\n let ignoredList = state.get('ignored') || [];\n\n if (typeof acceptInput !== 'undefined') {\n list.push(acceptInput);\n state.set('list', list);\n }\n\n if (typeof ignoreInput !== 'undefined') {\n ignoredList.push(ignoreInput);\n state.set('ignored', ignoredList);\n }\n\n if (list.length + ignoredList.length >= countInput) {\n accumulatedOutput.next(list);\n ignoredOutput.next(ignoredList);\n }\n}###"}
{"prompt":"Part that accumulates values based on count\n\n###\n\n","completion":" Accumulate Some Values by Count | accept,ignore,count | accumulated,ignored | IMPLICIT | accept,ignore\n(inputs, outputs, adv) => {\n const { accept, ignore, count } = inputs;\n const { accumulated, ignored } = outputs;\n const { state } = adv;\n\n let list = state.get(\"list\") || [];\n let ignoredList = state.get(\"ignored\") || [];\n\n if (typeof accept !== \"undefined\") {\n list.push(accept);\n state.set(\"list\", list);\n }\n\n if (typeof ignore !== \"undefined\") {\n ignoredList.push(ignore);\n state.set(\"ignored\", ignored);\n }\n\n if (list.length + ignoredList.length >= count) {\n accumulated.next(list);\n ignored.next(ignored);\n }\n }###"}
{"prompt":"A node that waits for a certain number of inputs before outputting accumulated and ignored values\n\n###\n\n","completion":" Accumulate Some Values by Count | accept,ignore,count | accumulated,ignored | IMPLICIT | accept,ignore\nfunction (inputData, outputData, advData) {\n const { acceptInput, ignoreInput, countInput } = inputData;\n const { accumulatedOutput, ignoredOutput } = outputData;\n const { state } = advData;\n\n let list = state.get('list') || [];\n let ignoredList = state.get('ignored') || [];\n\n if (typeof acceptInput !== 'undefined') {\n list.push(acceptInput);\n state.set('list', list);\n }\n\n if (typeof ignoreInput !== 'undefined') {\n ignoredList.push(ignoreInput);\n state.set('ignored', ignoredList);\n }\n\n if (list.length + ignoredList.length >= countInput) {\n accumulatedOutput.next(list);\n ignoredOutput.next(ignoredList);\n }\n}###"}
{"prompt":"Add item to list\n\n###\n\n","completion":" Append | list,item | list | IMPLICIT | NONE\n({ list, item }, { list: outputList }) => {\n outputList.next([...list, item]);\n }###"}
{"prompt":"Append to list\n\n###\n\n","completion":" Append | list,item | list | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { existingList, newItem } = inputData;\n const { updatedList } = outputData;\n\n const newList = [...existingList, newItem];\n updatedList.next(newList);\n}###"}
{"prompt":"Add to existing list\n\n###\n\n","completion":" Append | list,item | list | IMPLICIT | NONE\n({ list, item }, { list: outputList }) => {\n outputList.next([...list, item]);\n }###"}
{"prompt":"Add new item to existing list\n\n###\n\n","completion":" Append | list,item | list | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { existingList, newItem } = inputData;\n const { updatedList } = outputData;\n\n const newList = [...existingList, newItem];\n updatedList.next(newList);\n}###"}
{"prompt":"Remove item from list\n\n###\n\n","completion":" Remove | list,item | list | IMPLICIT | NONE\n({ list, item }, { list: outputList }) => {\n outputList.next(list.filter((i) => i !== item));\n }###"}
{"prompt":"Filter list by removing item\n\n###\n\n","completion":" Remove | list,item | list | IMPLICIT | NONE\nfunction ({ inputList, itemToRemove }, { outputList }) {\n const filteredList = inputList.filter((item) => item !== itemToRemove);\n outputList.next(filteredList);\n}###"}
{"prompt":"List filter\n\n###\n\n","completion":" Remove | list,item | list | IMPLICIT | NONE\n({ list, item }, { list: outputList }) => {\n outputList.next(list.filter((i) => i !== item));\n }###"}
{"prompt":"Remove item from a list of items\n\n###\n\n","completion":" Remove | list,item | list | IMPLICIT | NONE\nfunction ({ inputList, itemToRemove }, { outputList }) {\n const filteredList = inputList.filter((item) => item !== itemToRemove);\n outputList.next(filteredList);\n}###"}
{"prompt":"Remove an item from a list\n\n###\n\n","completion":" Remove At | list,index | list | IMPLICIT | NONE\n({ list, index }, { list: outputList }) => {\n outputList.next(list.filter((_, idx) => idx !== index));\n }###"}
{"prompt":"Delete an element from a list\n\n###\n\n","completion":" Remove At | list,index | list | IMPLICIT | NONE\nfunction ({ list, index }, { list: outputList }) {\n const newList = [...list.slice(0, index), ...list.slice(index + 1)];\n outputList.next(newList);\n}###"}
{"prompt":"List item remover\n\n###\n\n","completion":" Remove At | list,index | list | IMPLICIT | NONE\n({ list, index }, { list: outputList }) => {\n outputList.next(list.filter((_, idx) => idx !== index));\n }###"}
{"prompt":"Remove an element from a list by index\n\n###\n\n","completion":" Remove At | list,index | list | IMPLICIT | NONE\nfunction ({ list, index }, { list: outputList }) {\n const newList = [...list.slice(0, index), ...list.slice(index + 1)];\n outputList.next(newList);\n}###"}
{"prompt":"Extract a portion of a list\n\n###\n\n","completion":" Slice | list,start,end | list | IMPLICIT | NONE\n({ list, start, end }, { list: outputList }) => {\n outputList.next(list.slice(start, end));\n }###"}
{"prompt":"Slice a list\n\n###\n\n","completion":" Slice | list,start,end | list | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { list: inputList, start: startIndex, end: endIndex } = inputData;\n const { list: outputList } = outputData;\n outputList.next(inputList.slice(startIndex, endIndex));\n}###"}
{"prompt":"Get a sublist\n\n###\n\n","completion":" Slice | list,start,end | list | IMPLICIT | NONE\n({ list, start, end }, { list: outputList }) => {\n outputList.next(list.slice(start, end));\n }###"}
{"prompt":"Select a range from a list\n\n###\n\n","completion":" Slice | list,start,end | list | IMPLICIT | NONE\nfunction (inputData, outputData) {\n const { list: inputList, start: startIndex, end: endIndex } = inputData;\n const { list: outputList } = outputData;\n outputList.next(inputList.slice(startIndex, endIndex));\n}###"}
{"prompt":"Flatten a list of lists\n\n###\n\n","completion":" Flatten | list | list | IMPLICIT | NONE\n({ list }, { list: outputList }) => {\n outputList.next(list.reduce((acc, item) => [...acc, ...item], []));\n }###"}
{"prompt":"Combine nested lists into a single list\n\n###\n\n","completion":" Flatten | list | list | IMPLICIT | NONE\nfunction (inputList, outputList) {\n const { list } = inputList;\n const { list: output } = outputList;\n const flattenedList = list.reduce((acc, item) => [...acc, ...item], []);\n output.next(flattenedList);\n}###"}
{"prompt":"List flattener\n\n###\n\n","completion":" Flatten | list | list | IMPLICIT | NONE\n({ list }, { list: outputList }) => {\n outputList.next(list.reduce((acc, item) => [...acc, ...item], []));\n }###"}
{"prompt":"Combine multiple lists into one\n\n###\n\n","completion":" Flatten | list | list | IMPLICIT | NONE\nfunction (inputList, outputList) {\n const { list } = inputList;\n const { list: output } = outputList;\n const flattenedList = list.reduce((acc, item) => [...acc, ...item], []);\n output.next(flattenedList);\n}###"}
{"prompt":"Log a value\n\n###\n\n","completion":" Log | value | | IMPLICIT | NONE\n({ value }) => console.log(value)###"}
{"prompt":"Print value to console\n\n###\n\n","completion":" Log | value | | IMPLICIT | NONE\nfunction ({ inputValue }, { outputValue }) {\n outputValue.next(inputValue);\n}###"}
{"prompt":"Simple logging\n\n###\n\n","completion":" Log | value | | IMPLICIT | NONE\n({ value }) => console.log(value)###"}
{"prompt":"Log a value to console\n\n###\n\n","completion":" Log | value | | IMPLICIT | NONE\nfunction ({ inputValue }, { outputValue }) {\n outputValue.next(inputValue);\n}###"}
{"prompt":"Part that logs errors\n\n###\n\n","completion":" Error | value | | IMPLICIT | NONE\n({ value }) => console.error(value)###"}
{"prompt":"Log errors\n\n###\n\n","completion":" Error | value | | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { value } = inputs;\n console.error(value);\n}###"}
{"prompt":"Current date and time\n\n###\n\n","completion":" Now String | | now | IMPLICIT | NONE\n(_, { now }) => now.next(new Date().toString())###"}
{"prompt":"Get current date and time\n\n###\n\n","completion":" Now String | | now | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { result } = outputs;\n result.next(new Date().toString());\n}###"}
{"prompt":"Part that returns current date and time\n\n###\n\n","completion":" Now String | | now | IMPLICIT | NONE\n(_, { now }) => now.next(new Date().toString())###"}
{"prompt":"A part that outputs the current date and time\n\n###\n\n","completion":" Now String | | now | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { result } = outputs;\n result.next(new Date().toString());\n}###"}
{"prompt":"Current time as ISO string\n\n###\n\n","completion":" Now ISO String | | now | IMPLICIT | NONE\n(_, { now }) => now.next(new Date().toISOString())###"}
{"prompt":"Get current time as ISO string\n\n###\n\n","completion":" Now ISO String | | now | IMPLICIT | NONE\nfunction (input, output) {\n const { now } = output;\n setInterval(() => {\n now.next(new Date().toISOString());\n }, 1000);\n}###"}
{"prompt":"ISO string of current time\n\n###\n\n","completion":" Now ISO String | | now | IMPLICIT | NONE\n(_, { now }) => now.next(new Date().toISOString())###"}
{"prompt":"Convert current time to ISO string\n\n###\n\n","completion":" Now ISO String | | now | IMPLICIT | NONE\nfunction (input, output) {\n const { now } = output;\n setInterval(() => {\n now.next(new Date().toISOString());\n }, 1000);\n}###"}
{"prompt":"Current Unix Time\n\n###\n\n","completion":" Now Unix Time | | now | IMPLICIT | NONE\n(_, { now }) => now.next(new Date().getTime())###"}
{"prompt":"Get Unix Timestamp\n\n###\n\n","completion":" Now Unix Time | | now | IMPLICIT | NONE\nfunction (input, output) {\n const { now } = output;\n setInterval(() => {\n now.next(new Date().getTime());\n }, 1000);\n}###"}
{"prompt":"Unix Time Getter\n\n###\n\n","completion":" Now Unix Time | | now | IMPLICIT | NONE\n(_, { now }) => now.next(new Date().getTime())###"}
{"prompt":"Unix Timestamp\n\n###\n\n","completion":" Now Unix Time | | now | IMPLICIT | NONE\nfunction (input, output) {\n const { now } = output;\n setInterval(() => {\n now.next(new Date().getTime());\n }, 1000);\n}###"}
{"prompt":"Convert Unix Time to Date\n\n###\n\n","completion":" Date From Unix Time | time | date | IMPLICIT | NONE\n({ time }, { date }) => date.next(new Date(time))###"}
{"prompt":"Get Date from Unix Timestamp\n\n###\n\n","completion":" Date From Unix Time | time | date | IMPLICIT | NONE\nfunction (input, output) {\n const { unixTime } = input;\n const { date } = output;\n \n const dateObj = new Date(unixTime * 1000);\n date.next(dateObj);\n}###"}
{"prompt":"Unix Time to Date Converter\n\n###\n\n","completion":" Date From Unix Time | time | date | IMPLICIT | NONE\n({ time }, { date }) => date.next(new Date(time))###"}
{"prompt":"Convert Unix Timestamp to Date Object\n\n###\n\n","completion":" Date From Unix Time | time | date | IMPLICIT | NONE\nfunction (input, output) {\n const { unixTime } = input;\n const { date } = output;\n \n const dateObj = new Date(unixTime * 1000);\n date.next(dateObj);\n}###"}
{"prompt":"Convert string to date\n\n###\n\n","completion":" Date From String | string | date | IMPLICIT | NONE\n({ string }, { date }) => date.next(new Date(string))###"}
{"prompt":"Parse date from string\n\n###\n\n","completion":" Date From String | string | date | IMPLICIT | NONE\nfunction (input, output) {\n const { string } = input;\n const { date } = output;\n \n const parsedDate = new Date(string);\n \n if (isNaN(parsedDate.getTime())) {\n date.done(new Error('Invalid date string'));\n } else {\n date.next(parsedDate);\n }\n}###"}
{"prompt":"String to date converter\n\n###\n\n","completion":" Date From String | string | date | IMPLICIT | NONE\n({ string }, { date }) => date.next(new Date(string))###"}
{"prompt":"Date parser\n\n###\n\n","completion":" Date From String | string | date | IMPLICIT | NONE\nfunction (input, output) {\n const { string } = input;\n const { date } = output;\n \n const parsedDate = new Date(string);\n \n if (isNaN(parsedDate.getTime())) {\n date.done(new Error('Invalid date string'));\n } else {\n date.next(parsedDate);\n }\n}###"}
{"prompt":"Convert ISO string to date\n\n###\n\n","completion":" Date From ISO String | string | date | IMPLICIT | NONE\nasync ({ string }, { date }, { onError }) => {\n try {\n date.next(new Date(string));\n } catch (e) {\n console.error(\"Error in part\", e);\n onError(e);\n }\n }###"}
{"prompt":"Parse date from ISO string\n\n###\n\n","completion":" Date From ISO String | string | date | IMPLICIT | NONE\nfunction ({ inputString }, { outputDate }, { onError }) {\n try {\n outputDate.next(new Date(inputString));\n } catch (e) {\n console.error('Error in part', e);\n onError(e);\n }\n}###"}
{"prompt":"ISO string to JavaScript date\n\n###\n\n","completion":" Date From ISO String | string | date | IMPLICIT | NONE\nasync ({ string }, { date }, { onError }) => {\n try {\n date.next(new Date(string));\n } catch (e) {\n console.error(\"Error in part\", e);\n onError(e);\n }\n }###"}
{"prompt":"Create date from ISO string\n\n###\n\n","completion":" Date From ISO String | string | date | IMPLICIT | NONE\nfunction ({ inputString }, { outputDate }, { onError }) {\n try {\n outputDate.next(new Date(inputString));\n } catch (e) {\n console.error('Error in part', e);\n onError(e);\n }\n}###"}
{"prompt":"Convert date to string\n\n###\n\n","completion":" Date To String | date | string | IMPLICIT | NONE\n({ date }, { string }) => string.next(date.toString())###"}
{"prompt":"Date as string\n\n###\n\n","completion":" Date To String | date | string | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { string } = output;\n string.next(date.toLocaleDateString());\n}###"}
{"prompt":"Date to string conversion\n\n###\n\n","completion":" Date To String | date | string | IMPLICIT | NONE\n({ date }, { string }) => string.next(date.toString())###"}
{"prompt":"Convert date to a human-readable string\n\n###\n\n","completion":" Date To String | date | string | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { string } = output;\n string.next(date.toLocaleDateString());\n}###"}
{"prompt":"Convert date to ISO string\n\n###\n\n","completion":" Date To ISO String | date | string | IMPLICIT | NONE\n({ date }, { string }) => string.next(date.toISOString())###"}
{"prompt":"Get ISO string from date\n\n###\n\n","completion":" Date To ISO String | date | string | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { string } = output;\n \n const isoString = date.toISOString();\n string.next(isoString);\n}###"}
{"prompt":"Date to string converter\n\n###\n\n","completion":" Date To ISO String | date | string | IMPLICIT | NONE\n({ date }, { string }) => string.next(date.toISOString())###"}
{"prompt":"ISO string generator from date\n\n###\n\n","completion":" Date To ISO String | date | string | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { string } = output;\n \n const isoString = date.toISOString();\n string.next(isoString);\n}###"}
{"prompt":"Convert date to Unix time\n\n###\n\n","completion":" Date To Unix Time | date | time | IMPLICIT | NONE\n({ date }, { time }) => time.next(date.getTime())###"}
{"prompt":"Get Unix time from date\n\n###\n\n","completion":" Date To Unix Time | date | time | IMPLICIT | NONE\nfunction ({ dateInput }, { unixTimeOutput }) {\n const { date } = dateInput;\n const unixTime = date.getTime();\n unixTimeOutput.next(unixTime);\n}###"}
{"prompt":"Date to Unix timestamp\n\n###\n\n","completion":" Date To Unix Time | date | time | IMPLICIT | NONE\n({ date }, { time }) => time.next(date.getTime())###"}
{"prompt":"Unix timestamp from date\n\n###\n\n","completion":" Date To Unix Time | date | time | IMPLICIT | NONE\nfunction ({ dateInput }, { unixTimeOutput }) {\n const { date } = dateInput;\n const unixTime = date.getTime();\n unixTimeOutput.next(unixTime);\n}###"}
{"prompt":"Calculate current month\n\n###\n\n","completion":" Month To Date | date | month | IMPLICIT | NONE\n({ date }, { month }) => month.next(date.getMonth())###"}
{"prompt":"Get current month\n\n###\n\n","completion":" Month To Date | date | month | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { month } = output;\n const currentMonth = date.getMonth();\n month.next(currentMonth);\n}###"}
{"prompt":"Calculate month from date\n\n###\n\n","completion":" Month To Date | date | month | IMPLICIT | NONE\n({ date }, { month }) => month.next(date.getMonth())###"}
{"prompt":"Get month from date\n\n###\n\n","completion":" Month To Date | date | month | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { month } = output;\n const currentMonth = date.getMonth();\n month.next(currentMonth);\n}###"}
{"prompt":"Convert date to day\n\n###\n\n","completion":" Date To Day | date | day | IMPLICIT | NONE\n({ date }, { day }) => day.next(date.getDate())###"}
{"prompt":"Get day from date\n\n###\n\n","completion":" Date To Day | date | day | IMPLICIT | NONE\nfunction ({ dateInput }, { dayOutput }) {\n const { date } = dateInput;\n const { day } = dayOutput;\n const dayOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][date.getDay()];\n day.next(dayOfWeek);\n}###"}
{"prompt":"Extract day from date\n\n###\n\n","completion":" Date To Day | date | day | IMPLICIT | NONE\n({ date }, { day }) => day.next(date.getDate())###"}
{"prompt":"Transform date to day\n\n###\n\n","completion":" Date To Day | date | day | IMPLICIT | NONE\nfunction ({ dateInput }, { dayOutput }) {\n const { date } = dateInput;\n const { day } = dayOutput;\n const dayOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][date.getDay()];\n day.next(dayOfWeek);\n}###"}
{"prompt":"Convert date to hours\n\n###\n\n","completion":" Date To Hours | date | hours | IMPLICIT | NONE\n({ date }, { hours }) => hours.next(date.getHours())###"}
{"prompt":"Get hours from date\n\n###\n\n","completion":" Date To Hours | date | hours | IMPLICIT | NONE\nfunction ({ dateInput }, { hoursOutput }) {\n const { date } = dateInput;\n const { hours } = hoursOutput;\n const hoursValue = date.getHours();\n hours.next(hoursValue);\n}###"}
{"prompt":"Extract hours from date\n\n###\n\n","completion":" Date To Hours | date | hours | IMPLICIT | NONE\n({ date }, { hours }) => hours.next(date.getHours())###"}
{"prompt":"Transform date to hours\n\n###\n\n","completion":" Date To Hours | date | hours | IMPLICIT | NONE\nfunction ({ dateInput }, { hoursOutput }) {\n const { date } = dateInput;\n const { hours } = hoursOutput;\n const hoursValue = date.getHours();\n hours.next(hoursValue);\n}###"}
{"prompt":"Convert date to minutes\n\n###\n\n","completion":" Date To Minutes | date | minutes | IMPLICIT | NONE\n({ date }, { minutes }) => minutes.next(date.getMinutes())###"}
{"prompt":"Get minutes from date\n\n###\n\n","completion":" Date To Minutes | date | minutes | IMPLICIT | NONE\nfunction ({ dateInput }, { minutesOutput }) {\n const { date } = dateInput;\n const { minutes } = minutesOutput;\n const minutesValue = date.getMinutes();\n minutes.next(minutesValue);\n}###"}
{"prompt":"Extract minutes from date\n\n###\n\n","completion":" Date To Minutes | date | minutes | IMPLICIT | NONE\n({ date }, { minutes }) => minutes.next(date.getMinutes())###"}
{"prompt":"Transform date to minutes\n\n###\n\n","completion":" Date To Minutes | date | minutes | IMPLICIT | NONE\nfunction ({ dateInput }, { minutesOutput }) {\n const { date } = dateInput;\n const { minutes } = minutesOutput;\n const minutesValue = date.getMinutes();\n minutes.next(minutesValue);\n}###"}
{"prompt":"Convert date to seconds\n\n###\n\n","completion":" Date To Seconds | date | seconds | IMPLICIT | NONE\n({ date }, { seconds }) => seconds.next(date.getSeconds())###"}
{"prompt":"Get seconds from date\n\n###\n\n","completion":" Date To Seconds | date | seconds | IMPLICIT | NONE\nfunction ({ inputDate }, { outputSeconds }) {\n const { date } = inputDate;\n const { seconds } = outputSeconds;\n seconds.next(date.getSeconds());\n}###"}
{"prompt":"Convert date to seconds output\n\n###\n\n","completion":" Date To Seconds | date | seconds | IMPLICIT | NONE\n({ date }, { seconds }) => seconds.next(date.getSeconds())###"}
{"prompt":"Get seconds output\n\n###\n\n","completion":" Date To Seconds | date | seconds | IMPLICIT | NONE\nfunction ({ inputDate }, { outputSeconds }) {\n const { date } = inputDate;\n const { seconds } = outputSeconds;\n seconds.next(date.getSeconds());\n}###"}
{"prompt":"Convert date to milliseconds\n\n###\n\n","completion":" Date To Milliseconds | date | milliseconds | IMPLICIT | NONE\n({ date }, { milliseconds }) =>\n milliseconds.next(date.getMilliseconds())###"}
{"prompt":"Get milliseconds from date\n\n###\n\n","completion":" Date To Milliseconds | date | milliseconds | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { milliseconds } = output;\n \n const dateInMs = date.getTime();\n milliseconds.next(dateInMs);\n}###"}
{"prompt":"Date to milliseconds converter\n\n###\n\n","completion":" Date To Milliseconds | date | milliseconds | IMPLICIT | NONE\n({ date }, { milliseconds }) =>\n milliseconds.next(date.getMilliseconds())###"}
{"prompt":"Convert a date to its corresponding milliseconds\n\n###\n\n","completion":" Date To Milliseconds | date | milliseconds | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { milliseconds } = output;\n \n const dateInMs = date.getTime();\n milliseconds.next(dateInMs);\n}###"}
{"prompt":"Convert date to day of week\n\n###\n\n","completion":" Date To Day Of Week | date | day | IMPLICIT | NONE\n({ date }, { day }) => day.next(date.getDay())###"}
{"prompt":"Get day of week from date\n\n###\n\n","completion":" Date To Day Of Week | date | day | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { day } = output;\n const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n const dayOfWeek = daysOfWeek[date.getDay()];\n day.next(dayOfWeek);\n}###"}
{"prompt":"Date to day converter\n\n###\n\n","completion":" Date To Day Of Week | date | day | IMPLICIT | NONE\n({ date }, { day }) => day.next(date.getDay())###"}
{"prompt":"Day of week from date\n\n###\n\n","completion":" Date To Day Of Week | date | day | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { day } = output;\n const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n const dayOfWeek = daysOfWeek[date.getDay()];\n day.next(dayOfWeek);\n}###"}
{"prompt":"Get Timezone Offset from Date\n\n###\n\n","completion":" Date To Timezone Offset | date | offset | IMPLICIT | NONE\n({ date }, { offset }) => offset.next(date.getTimezoneOffset())###"}
{"prompt":"Convert Date to Timezone Offset\n\n###\n\n","completion":" Date To Timezone Offset | date | offset | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { offset } = output;\n const timezoneOffset = date.getTimezoneOffset();\n offset.next(timezoneOffset);\n}###"}
{"prompt":"Calculate Timezone Offset from Date\n\n###\n\n","completion":" Date To Timezone Offset | date | offset | IMPLICIT | NONE\n({ date }, { offset }) => offset.next(date.getTimezoneOffset())###"}
{"prompt":"Get Timezone Offset\n\n###\n\n","completion":" Date To Timezone Offset | date | offset | IMPLICIT | NONE\nfunction (input, output) {\n const { date } = input;\n const { offset } = output;\n const timezoneOffset = date.getTimezoneOffset();\n offset.next(timezoneOffset);\n}###"}
{"prompt":"Set a global state value\n\n###\n\n","completion":" Set Global State | key,value | setValue | IMPLICIT | NONE\n({ key, value }, { setValue }, { globalState }) => {\n globalState.set(key, value);\n setValue.next(value);\n }###"}
{"prompt":"Update global state\n\n###\n\n","completion":" Set Global State | key,value | setValue | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { key, value } = inputs;\n const { setValue } = outputs;\n\n const newGlobalState = {...adv.state.globalState, [key]: value};\n adv.state.globalState = newGlobalState;\n setValue.next(value);\n}###"}
{"prompt":"Set a value in global state\n\n###\n\n","completion":" Set Global State | key,value | setValue | IMPLICIT | NONE\n({ key, value }, { setValue }, { globalState }) => {\n globalState.set(key, value);\n setValue.next(value);\n }###"}
{"prompt":"Update global state value\n\n###\n\n","completion":" Set Global State | key,value | setValue | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { key, value } = inputs;\n const { setValue } = outputs;\n\n const newGlobalState = {...adv.state.globalState, [key]: value};\n adv.state.globalState = newGlobalState;\n setValue.next(value);\n}###"}
{"prompt":"Retrieve value from global state\n\n###\n\n","completion":" Get Global State | key,defaultValue | value | IMPLICIT | NONE\n({ key, defaultValue }, { value }, { globalState, onError }) => {\n const val = globalState.get(key);\n if (val === undefined && defaultValue === undefined) {\n onError(new Error(`Key ${key} is not set`));\n } else {\n value.next(globalState.get(key) ?? defaultValue);\n }\n }###"}
{"prompt":"Get value from global state\n\n###\n\n","completion":" Get Global State | key,defaultValue | value | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { key: newKey, defaultValue: newDefaultValue } = inputs;\n const { value: newValue } = outputs;\n\n const val = adv.state.get(newKey);\n if (val === undefined && newDefaultValue === undefined) {\n adv.onError(new Error(`Key ${newKey} is not set`));\n } else {\n newValue.next(adv.state.get(newKey) ?? newDefaultValue);\n }\n}###"}
{"prompt":"Fetch value from global state\n\n###\n\n","completion":" Get Global State | key,defaultValue | value | IMPLICIT | NONE\n({ key, defaultValue }, { value }, { globalState, onError }) => {\n const val = globalState.get(key);\n if (val === undefined && defaultValue === undefined) {\n onError(new Error(`Key ${key} is not set`));\n } else {\n value.next(globalState.get(key) ?? defaultValue);\n }\n }###"}
{"prompt":"Access global state value\n\n###\n\n","completion":" Get Global State | key,defaultValue | value | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { key: newKey, defaultValue: newDefaultValue } = inputs;\n const { value: newValue } = outputs;\n\n const val = adv.state.get(newKey);\n if (val === undefined && newDefaultValue === undefined) {\n adv.onError(new Error(`Key ${newKey} is not set`));\n } else {\n newValue.next(adv.state.get(newKey) ?? newDefaultValue);\n }\n}###"}
{"prompt":"Connect to database\n\n###\n\n","completion":" Connect | host,port,database,user,password | connection | IMPLICIT | NONE\nasync ({ path }, {}) => {\n await fs.promises.unlink(path);\n }###"}
{"prompt":"Establish database connection\n\n###\n\n","completion":" Connect | host,port,database,user,password | connection | IMPLICIT | NONE\nfunction ({ host, port, database, user, password }, { connection }) {\n const db = new Database({\n host,\n port,\n database,\n user,\n password\n });\n await db.connect();\n connection.next(db);\n}###"}
{"prompt":"Create database connection\n\n###\n\n","completion":" Connect | host,port,database,user,password | connection | IMPLICIT | NONE\nasync ({ path }, {}) => {\n await fs.promises.unlink(path);\n }###"}
{"prompt":"Connect to database server\n\n###\n\n","completion":" Connect | host,port,database,user,password | connection | IMPLICIT | NONE\nfunction ({ host, port, database, user, password }, { connection }) {\n const db = new Database({\n host,\n port,\n database,\n user,\n password\n });\n await db.connect();\n connection.next(db);\n}###"}
{"prompt":"Find a single document in a MongoDB collection\n\n###\n\n","completion":" FindOne | connection,collection,query,options | result | IMPLICIT | NONE\nasync ({ connection, collection, query, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .find(query, options)\n .toArray();\n result.next(res);\n }###"}
{"prompt":"Search for a document in a MongoDB collection\n\n###\n\n","completion":" FindOne | connection,collection,query,options | result | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { conn, coll, q, opt } = inputs;\n const { res } = outputs;\n\n const result = await conn\n .db()\n .collection(coll)\n .findOne(q, opt);\n res.next(result);\n}###"}
{"prompt":"Retrieve a single document from a MongoDB collection\n\n###\n\n","completion":" FindOne | connection,collection,query,options | result | IMPLICIT | NONE\nasync ({ connection, collection, query, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .find(query, options)\n .toArray();\n result.next(res);\n }###"}
{"prompt":"Find a document in a MongoDB collection with specific criteria\n\n###\n\n","completion":" FindOne | connection,collection,query,options | result | IMPLICIT | NONE\nfunction (inputs, outputs, adv) {\n const { conn, coll, q, opt } = inputs;\n const { res } = outputs;\n\n const result = await conn\n .db()\n .collection(coll)\n .findOne(q, opt);\n res.next(result);\n}###"}
{"prompt":"Check if file exists\n\n###\n\n","completion":" Disconnect | connection | | IMPLICIT | NONE\nasync ({ path }, { exists }) => {\n \/\/ check if file in path exists\n return exists.next(await fs.promises.access(path, fs.constants.F_OK));\n }###"}
{"prompt":"File existence checker\n\n###\n\n","completion":" Disconnect | connection | | IMPLICIT | NONE\nfunction ({ filePath }, { fileExists }) {\n return fs.promises.access(filePath, fs.constants.F_OK)\n .then(() => fileExists.next(true))\n .catch(() => fileExists.next(false));\n}###"}
{"prompt":"Part that verifies file existence\n\n###\n\n","completion":" Disconnect | connection | | IMPLICIT | NONE\nasync ({ path }, { exists }) => {\n \/\/ check if file in path exists\n return exists.next(await fs.promises.access(path, fs.constants.F_OK));\n }###"}
{"prompt":"Verify if file exists in path\n\n###\n\n","completion":" Disconnect | connection | | IMPLICIT | NONE\nfunction ({ filePath }, { fileExists }) {\n return fs.promises.access(filePath, fs.constants.F_OK)\n .then(() => fileExists.next(true))\n .catch(() => fileExists.next(false));\n}###"}
{"prompt":"Insert a document into a collection\n\n###\n\n","completion":" InsertOne | connection,collection,document,options | result | IMPLICIT | NONE\nasync ({ connection }) => {\n await connection.close();\n }###"}
{"prompt":"Add a document to a database\n\n###\n\n","completion":" InsertOne | connection,collection,document,options | result | IMPLICIT | NONE\nfunction ({ db, collectionName, document }) {\n const collection = db.collection(collectionName);\n return collection.insertOne(document);\n}###"}
{"prompt":"Insert a record into a collection\n\n###\n\n","completion":" InsertOne | connection,collection,document,options | result | IMPLICIT | NONE\nasync ({ connection }) => {\n await connection.close();\n }###"}
{"prompt":"Add a record to a database\n\n###\n\n","completion":" InsertOne | connection,collection,document,options | result | IMPLICIT | NONE\nfunction ({ db, collectionName, document }) {\n const collection = db.collection(collectionName);\n return collection.insertOne(document);\n}###"}
{"prompt":"Insert multiple documents to a collection\n\n###\n\n","completion":" InsertMany | connection,collection,documents,options | result | IMPLICIT | NONE\nasync ({ connection }) => {\n await connection.value?.end();\n }###"}
{"prompt":"Add multiple items to a database\n\n###\n\n","completion":" InsertMany | connection,collection,documents,options | result | IMPLICIT | NONE\nfunction ({ db, collection, documents }) {\n return db.collection(collection).insertMany(documents);\n}###"}
{"prompt":"Bulk insert to a collection\n\n###\n\n","completion":" InsertMany | connection,collection,documents,options | result | IMPLICIT | NONE\nasync ({ connection }) => {\n await connection.value?.end();\n }###"}
{"prompt":"Insert many documents to a database\n\n###\n\n","completion":" InsertMany | connection,collection,documents,options | result | IMPLICIT | NONE\nfunction ({ db, collection, documents }) {\n return db.collection(collection).insertMany(documents);\n}###"}
{"prompt":"Update a single document in a MongoDB collection\n\n###\n\n","completion":" UpdateOne | connection,collection,filter,update,options | result | IMPLICIT | NONE\nasync ({ connection, collection, document, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .insertOne(document, options);\n result.next(res);\n }###"}
{"prompt":"Update one document in a MongoDB collection\n\n###\n\n","completion":" UpdateOne | connection,collection,filter,update,options | result | IMPLICIT | NONE\nfunction ({ connection, collection, filter, update, options }, { result }) {\n const res = await connection\n .db()\n .collection(collection)\n .updateOne(filter, update, options);\n result.next(res);\n }###"}
{"prompt":"Update a MongoDB document\n\n###\n\n","completion":" UpdateOne | connection,collection,filter,update,options | result | IMPLICIT | NONE\nasync ({ connection, collection, document, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .insertOne(document, options);\n result.next(res);\n }###"}
{"prompt":"Update a single MongoDB document with specific filter and update\n\n###\n\n","completion":" UpdateOne | connection,collection,filter,update,options | result | IMPLICIT | NONE\nfunction ({ connection, collection, filter, update, options }, { result }) {\n const res = await connection\n .db()\n .collection(collection)\n .updateOne(filter, update, options);\n result.next(res);\n }###"}
{"prompt":"Update multiple documents in a collection\n\n###\n\n","completion":" UpdateMany | connection,collection,filter,update,options | result | IMPLICIT | NONE\nasync ({ connection, collection, documents, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .insertMany(documents, options);\n result.next(res);\n }###"}
{"prompt":"Update many documents at once\n\n###\n\n","completion":" UpdateMany | connection,collection,filter,update,options | result | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { conn, coll, filter, update, options } = inputData;\n const { result } = outputData;\n\n const res = await conn\n .db()\n .collection(coll)\n .updateMany(filter, update, options);\n result.next(res);\n}###"}
{"prompt":"Update documents in bulk\n\n###\n\n","completion":" UpdateMany | connection,collection,filter,update,options | result | IMPLICIT | NONE\nasync ({ connection, collection, documents, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .insertMany(documents, options);\n result.next(res);\n }###"}
{"prompt":"Update multiple documents with a single call\n\n###\n\n","completion":" UpdateMany | connection,collection,filter,update,options | result | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { conn, coll, filter, update, options } = inputData;\n const { result } = outputData;\n\n const res = await conn\n .db()\n .collection(coll)\n .updateMany(filter, update, options);\n result.next(res);\n}###"}
{"prompt":"Delete a document from a MongoDB collection\n\n###\n\n","completion":" DeleteOne | connection,collection,filter,options | result | IMPLICIT | NONE\nasync (\n { connection, collection, filter, update, options },\n { result }\n ) => {\n const res = await connection\n .db()\n .collection(collection)\n .updateOne(filter, update, options);\n result.next(res);\n }###"}
{"prompt":"Delete a single document from a MongoDB collection\n\n###\n\n","completion":" DeleteOne | connection,collection,filter,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, filt, opts }, { res }) {\n const result = await conn.db().collection(coll).deleteOne(filt, opts);\n res.next(result);\n}###"}
{"prompt":"Delete a document from a MongoDB collection with specified filter\n\n###\n\n","completion":" DeleteOne | connection,collection,filter,options | result | IMPLICIT | NONE\nasync (\n { connection, collection, filter, update, options },\n { result }\n ) => {\n const res = await connection\n .db()\n .collection(collection)\n .updateOne(filter, update, options);\n result.next(res);\n }###"}
{"prompt":"Delete a single document from a MongoDB collection with specified filter\n\n###\n\n","completion":" DeleteOne | connection,collection,filter,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, filt, opts }, { res }) {\n const result = await conn.db().collection(coll).deleteOne(filt, opts);\n res.next(result);\n}###"}
{"prompt":"Delete multiple documents from a MongoDB collection\n\n###\n\n","completion":" DeleteMany | connection,collection,filter,options | result | IMPLICIT | NONE\nasync (\n { connection, collection, filter, update, options },\n { result }\n ) => {\n const res = await connection\n .db()\n .collection(collection)\n .updateMany(filter, update, options);\n result.next(res);\n }###"}
{"prompt":"Delete many documents from a MongoDB collection\n\n###\n\n","completion":" DeleteMany | connection,collection,filter,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, filt, opts }, { res }) {\n const result = await conn\n .db()\n .collection(coll)\n .deleteMany(filt, opts);\n res.next(result);\n }###"}
{"prompt":"A part that deletes multiple documents from a MongoDB collection\n\n###\n\n","completion":" DeleteMany | connection,collection,filter,options | result | IMPLICIT | NONE\nasync (\n { connection, collection, filter, update, options },\n { result }\n ) => {\n const res = await connection\n .db()\n .collection(collection)\n .updateMany(filter, update, options);\n result.next(res);\n }###"}
{"prompt":"A MongoDB collection deleter that can delete multiple documents\n\n###\n\n","completion":" DeleteMany | connection,collection,filter,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, filt, opts }, { res }) {\n const result = await conn\n .db()\n .collection(coll)\n .deleteMany(filt, opts);\n res.next(result);\n }###"}
{"prompt":"Count documents in MongoDB collection\n\n###\n\n","completion":" CountDocuments | connection,collection,query,options | result | IMPLICIT | NONE\nasync ({ connection, collection, filter, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .deleteOne(filter, options);\n result.next(res);\n }###"}
{"prompt":"Get number of documents in MongoDB collection\n\n###\n\n","completion":" CountDocuments | connection,collection,query,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, query, opts }, { count }) {\n const res = await conn\n .db()\n .collection(coll)\n .countDocuments(query, opts);\n count.next(res);\n}###"}
{"prompt":"MongoDB document count\n\n###\n\n","completion":" CountDocuments | connection,collection,query,options | result | IMPLICIT | NONE\nasync ({ connection, collection, filter, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .deleteOne(filter, options);\n result.next(res);\n }###"}
{"prompt":"Count number of documents in MongoDB collection\n\n###\n\n","completion":" CountDocuments | connection,collection,query,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, query, opts }, { count }) {\n const res = await conn\n .db()\n .collection(coll)\n .countDocuments(query, opts);\n count.next(res);\n}###"}
{"prompt":"Create Index\n\n###\n\n","completion":" CreateIndex | connection,collection,fieldOrSpec,options | result | IMPLICIT | NONE\nasync ({ connection, collection, filter, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .deleteMany(filter, options);\n result.next(res);\n }###"}
{"prompt":"Add Index to Collection\n\n###\n\n","completion":" CreateIndex | connection,collection,fieldOrSpec,options | result | IMPLICIT | NONE\nfunction (inputParams, outputParams, adv) {\n const { conn, coll, fieldOrSpec, options } = inputParams;\n const { result } = outputParams;\n\n const res = await conn\n .db()\n .collection(coll)\n .createIndex(fieldOrSpec, options);\n result.next(res);\n}###"}
{"prompt":"Index Creation\n\n###\n\n","completion":" CreateIndex | connection,collection,fieldOrSpec,options | result | IMPLICIT | NONE\nasync ({ connection, collection, filter, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .deleteMany(filter, options);\n result.next(res);\n }###"}
{"prompt":"Database Indexing\n\n###\n\n","completion":" CreateIndex | connection,collection,fieldOrSpec,options | result | IMPLICIT | NONE\nfunction (inputParams, outputParams, adv) {\n const { conn, coll, fieldOrSpec, options } = inputParams;\n const { result } = outputParams;\n\n const res = await conn\n .db()\n .collection(coll)\n .createIndex(fieldOrSpec, options);\n result.next(res);\n}###"}
{"prompt":"Create Indexes\n\n###\n\n","completion":" CreateIndexes | connection,collection,indexes,options | result | IMPLICIT | NONE\nasync ({ connection, collection, query, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .countDocuments(query, options);\n result.next(res);\n }###"}
{"prompt":"Add Indexes to Collection\n\n###\n\n","completion":" CreateIndexes | connection,collection,indexes,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, idx, opts }, { res }) {\n const result = await conn\n .db()\n .collection(coll)\n .createIndexes(idx, opts);\n res.next(result);\n }###"}
{"prompt":"MongoDB Index Creator\n\n###\n\n","completion":" CreateIndexes | connection,collection,indexes,options | result | IMPLICIT | NONE\nasync ({ connection, collection, query, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .countDocuments(query, options);\n result.next(res);\n }###"}
{"prompt":"Index Manager\n\n###\n\n","completion":" CreateIndexes | connection,collection,indexes,options | result | IMPLICIT | NONE\nfunction ({ conn, coll, idx, opts }, { res }) {\n const result = await conn\n .db()\n .collection(coll)\n .createIndexes(idx, opts);\n res.next(result);\n }###"}
{"prompt":"Write contents to file\n\n###\n\n","completion":" Write File | path,contents,encoding | | IMPLICIT | NONE\nasync ({ connection, collection, indexes, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .createIndexes(indexes, options);\n result.next(res);\n }###"}
{"prompt":"Save data to file\n\n###\n\n","completion":" Write File | path,contents,encoding | | IMPLICIT | NONE\nfunction ({ filePath, fileContents, encoding }, { success }) {\n const fs = require('fs');\n fs.writeFile(filePath, fileContents, encoding, (err) => {\n if (err) {\n success.error(err);\n } else {\n success.next('File saved successfully!');\n }\n });\n}###"}
{"prompt":"Write to file\n\n###\n\n","completion":" Write File | path,contents,encoding | | IMPLICIT | NONE\nasync ({ connection, collection, indexes, options }, { result }) => {\n const res = await connection\n .db()\n .collection(collection)\n .createIndexes(indexes, options);\n result.next(res);\n }###"}
{"prompt":"Store data in file\n\n###\n\n","completion":" Write File | path,contents,encoding | | IMPLICIT | NONE\nfunction ({ filePath, fileContents, encoding }, { success }) {\n const fs = require('fs');\n fs.writeFile(filePath, fileContents, encoding, (err) => {\n if (err) {\n success.error(err);\n } else {\n success.next('File saved successfully!');\n }\n });\n}###"}
{"prompt":"Append to file\n\n###\n\n","completion":" Append File | path,contents,encoding | | IMPLICIT | NONE\nasync ({ path, encoding }, { contents }) => {\n return contents.next(await fs.promises.readFile(path, encoding));\n }###"}
{"prompt":"Add content to file\n\n###\n\n","completion":" Append File | path,contents,encoding | | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { filePath, fileContent, fileEncoding } = inputData;\n const { success } = outputData;\n \n fs.appendFile(filePath, fileContent, { encoding: fileEncoding }, (err) => {\n if (err) {\n success.next(false);\n } else {\n success.next(true);\n }\n });\n}###"}
{"prompt":"Write to file\n\n###\n\n","completion":" Append File | path,contents,encoding | | IMPLICIT | NONE\nasync ({ path, encoding }, { contents }) => {\n return contents.next(await fs.promises.readFile(path, encoding));\n }###"}
{"prompt":"Save to file\n\n###\n\n","completion":" Append File | path,contents,encoding | | IMPLICIT | NONE\nfunction (inputData, outputData, adv) {\n const { filePath, fileContent, fileEncoding } = inputData;\n const { success } = outputData;\n \n fs.appendFile(filePath, fileContent, { encoding: fileEncoding }, (err) => {\n if (err) {\n success.next(false);\n } else {\n success.next(true);\n }\n });\n}###"}
{"prompt":"Delete a file\n\n###\n\n","completion":" Delete File | path | | IMPLICIT | NONE\n({ path, contents, encoding }) => {\n return fs.promises.writeFile(path, contents, encoding);\n }###"}
{"prompt":"Remove file from path\n\n###\n\n","completion":" Delete File | path | | IMPLICIT | NONE\nfunction (input, output, adv) {\n const { path } = input;\n const { result } = output;\n\n fs.unlink(path, (err) => {\n if (err) {\n result.error(err);\n } else {\n result.complete();\n }\n });\n}###"}
{"prompt":"Part that deletes a file\n\n###\n\n","completion":" Delete File | path | | IMPLICIT | NONE\n({ path, contents, encoding }) => {\n return fs.promises.writeFile(path, contents, encoding);\n }###"}