-
Notifications
You must be signed in to change notification settings - Fork 17
/
array_create.json
94 lines (94 loc) · 2.53 KB
/
array_create.json
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
{
"id": "array_create",
"summary": "Create an array",
"description": "Creates a new array, which by default is empty.\n\nThe second parameter `repeat` allows to add the given array multiple times to the new array.\n\nIn most cases you can simply pass a (native) array to processes directly, but this process is especially useful to create a new array that is getting returned by a child process, for example in ``apply_dimension()``.",
"categories": [
"arrays"
],
"parameters": [
{
"name": "data",
"description": "A (native) array to fill the newly created array with. Defaults to an empty array.",
"optional": true,
"default": [],
"schema": {
"type": "array",
"items": {
"description": "Any data type is allowed."
}
}
},
{
"name": "repeat",
"description": "The number of times the (native) array specified in `data` is repeatedly added after each other to the new array being created. Defaults to `1`.",
"optional": true,
"default": 1,
"schema": {
"type": "integer",
"minimum": 1
}
}
],
"returns": {
"description": "The newly created array.",
"schema": {
"type": "array",
"items": {
"description": "Any data type is allowed."
}
}
},
"examples": [
{
"arguments": {},
"returns": []
},
{
"arguments": {
"data": [
"this",
"is",
"a",
"test"
]
},
"returns": [
"this",
"is",
"a",
"test"
]
},
{
"arguments": {
"data": [
null
],
"repeat": 3
},
"returns": [
null,
null,
null
]
},
{
"arguments": {
"data": [
1,
2,
3
],
"repeat": 2
},
"returns": [
1,
2,
3,
1,
2,
3
]
}
]
}