Skip to content

Commit e9a7600

Browse files
committed
feat: added more runtime function definitons
1 parent 057546e commit e9a7600

11 files changed

Lines changed: 315 additions & 35 deletions

File tree

definitions/data_types/array.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@
88
"name": [
99
{
1010
"code": "en-US",
11-
"content": "Array"
11+
"content": "Generic Array"
1212
}
1313
],
14+
"rules": [
15+
{
16+
"contains_type": {
17+
"data_type_identifier": "GENERIC"
18+
}
19+
}
20+
],
21+
"parent_type_identifier": null
1422
}
23+
1524
```
1625
## NUMBER_ARRAY
1726

@@ -27,10 +36,8 @@
2736
],
2837
"rules": [
2938
{
30-
"config": {
31-
"contains_type": {
32-
"data_type_identifier": "NUMBER"
33-
}
39+
"contains_type": {
40+
"data_type_identifier": "NUMBER"
3441
}
3542
}
3643
],
@@ -52,10 +59,8 @@
5259
],
5360
"rules": [
5461
{
55-
"config": {
56-
"contains_type": {
57-
"data_type_identifier": "TEXT"
58-
}
62+
"contains_type": {
63+
"data_type_identifier": "TEXT"
5964
}
6065
}
6166
],
@@ -77,10 +82,8 @@
7782
],
7883
"rules": [
7984
{
80-
"config": {
81-
"contains_type": {
82-
"data_type_identifier": "BOOLEAN"
83-
}
85+
"contains_type": {
86+
"data_type_identifier": "BOOLEAN"
8487
}
8588
}
8689
],

definitions/data_types/node.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Input Node
2+
3+
```json
4+
{
5+
"variant": "NODE",
6+
"identifier": "FILTER_GENERIC_INPUT_NODE",
7+
"name": [
8+
{
9+
"code": "en-US",
10+
"content": "Input"
11+
}
12+
],
13+
"rules": [
14+
{
15+
"input_type": {
16+
"identifier": "GENERIC"
17+
}
18+
},
19+
{
20+
"return_type": {
21+
"identifier": "BOOLEAN"
22+
}
23+
}
24+
]
25+
}
26+
```
27+
## Input Node
28+
29+
```json
30+
{
31+
"variant": "NODE",
32+
"identifier": "MAP_GENERIC_INPUT_NODE",
33+
"name": [
34+
{
35+
"code": "en-US",
36+
"content": "Input"
37+
}
38+
],
39+
"rules": [
40+
{
41+
"input_type": {
42+
"identifier": "A_GENERIC"
43+
}
44+
},
45+
{
46+
"return_type": {
47+
"identifier": "B_GENERIC"
48+
}
49+
}
50+
]
51+
}
52+
```

definitions/data_types/primitive.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
],
1515
"rules": [
1616
{
17-
"config": {
18-
"regex": {
19-
"pattern": "/^(?:-(?:[1-9](?:\d{0,2}(?:,\d{3})+|\d*))|(?:0|(?:[1-9](?:\d{0,2}(?:,\d{3})+|\d*))))(?:.\d+|)$/"
20-
}
17+
"regex": {
18+
"pattern": "/^(?:-(?:[1-9](?:\d{0,2}(?:,\d{3})+|\d*))|(?:0|(?:[1-9](?:\d{0,2}(?:,\d{3})+|\d*))))(?:.\d+|)$/"
2119
}
2220
}
2321
]
@@ -39,10 +37,8 @@
3937
],
4038
"rules": [
4139
{
42-
"config": {
43-
"regex": {
44-
"pattern": "[\s\S]*"
45-
}
40+
"regex": {
41+
"pattern": "[\s\S]*"
4642
}
4743
}
4844
]
@@ -63,10 +59,8 @@
6359
],
6460
"rules": [
6561
{
66-
"config": {
67-
"regex": {
68-
"pattern": "^(true|false)$"
69-
}
62+
"regex": {
63+
"pattern": "^(true|false)$"
7064
}
7165
}
7266
]

definitions/data_types/type.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
],
1515
"rules": [
1616
{
17-
"config": {
18-
"item_of_collection": {
19-
"items": [
17+
"item_of_collection": {
18+
"items": [
2019
"ASCII",
2120
"UTF-8",
2221
"UTF-16",
2322
"UTF-32"
2423
]
2524
}
26-
}
2725
}
2826
]
2927
}
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
## at
2+
Will return the value at the index of the array.
3+
4+
```json
5+
{
6+
"runtime_name": "std::array::at",
7+
"runtime_parameter_definitions": [
8+
{
9+
"data_type_identifier": "NUMBER",
10+
"runtime_name": "index"
11+
}
12+
],
13+
"return_type_identifier": "GENERIC"
14+
}
15+
```
16+
17+
## concat
18+
Will merge to arrays together and return a new one
19+
20+
```json
21+
{
22+
"runtime_name": "std::array::concat",
23+
"runtime_parameter_definitions": [
24+
{
25+
"data_type_identifier": "ARRAY",
26+
"runtime_name": "first"
27+
},
28+
{
29+
"data_type_identifier": "ARRAY",
30+
"runtime_name": "second"
31+
}
32+
],
33+
"return_type_identifier": "ARRAY"
34+
}
35+
```
36+
37+
## filter
38+
Will filter the function by the given function
39+
40+
```json
41+
{
42+
"runtime_name": "std::array::filter",
43+
"runtime_parameter_definitions": [
44+
{
45+
"data_type_identifier": "ARRAY",
46+
"runtime_name": "array"
47+
},
48+
{
49+
"data_type_identifier": "FILTER_INPUT_GENERIC_NODE",
50+
"runtime_name": "fitler"
51+
}
52+
],
53+
"return_type_identifier": "ARRAY"
54+
}
55+
```
56+
57+
## find
58+
idk how to do functions
59+
60+
some node with a boolean as return type???
61+
62+
## findIndex
63+
idk how to do functions
64+
65+
some node with a boolean as return type???
66+
67+
## first
68+
idk how to do functions
69+
70+
some node with a boolean as return type???
71+
72+
## last
73+
idk how to do functions
74+
75+
some node with a boolean as return type???
76+
77+
## forEach
78+
idk how to do functions
79+
80+
some node with a boolean as return type???
81+
82+
## map
83+
idk how to do functions
84+
85+
some node with a boolean as return type???
86+
87+
## push
88+
Will add the given entry to the array and returns the new length of the array
89+
90+
```json
91+
{
92+
"runtime_name": "std::array::filter",
93+
"runtime_parameter_definitions": [
94+
{
95+
"data_type_identifier": "ARRAY",
96+
"runtime_name": "array"
97+
},
98+
{
99+
"data_type_identifier": "",
100+
"runtime_name": "value"
101+
}
102+
],
103+
"return_type_identifier": "NUMBER"
104+
}
105+
```
106+
107+
[Ref](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push)
108+
109+
## pop
110+
Will remove the last entry of the array and return it
111+
112+
```json
113+
{
114+
"runtime_name": "std::array::pop",
115+
"runtime_parameter_definitions": [
116+
{
117+
"data_type_identifier": "ARRAY",
118+
"runtime_name": "array"
119+
}
120+
],
121+
"return_type_identifier": "GENERIC"
122+
}
123+
```
124+
125+
[Ref](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/pop)
126+
127+
## remove
128+
129+
## isEmpty
130+
131+
## size
132+
133+
## indexOf
134+
135+
## toUnique
136+
137+
## sort
138+
139+
## sortASC
140+
141+
## sortDESC
142+
143+
## reverse
144+
145+
## flat
146+
147+
## clear
148+
149+
## replace
150+
151+
move to number_arry
152+
153+
154+
min
155+
156+
max
157+
158+
sum
159+
160+
## join
161+
will join every entry by a given text

definitions/functions/boolean-audit.md renamed to definitions/functions/primitive/boolean-audit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@
66
- fromText
77
- fromNumber
88
- negate
9+
10+
# 06.05.2025
11+
12+
## Added
13+
- isEqual

definitions/functions/boolean.md renamed to definitions/functions/primitive/boolean.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,20 @@ Will convert the string to a boolean.
9191
"true" --> true
9292

9393

94-
## negate
95-
Will negate the boolean.
94+
## isEqual
95+
Will compare one boolean to another.
9696

9797
```json
9898
{
99-
"runtime_name": "std::boolean::negate",
99+
"runtime_name": "std::boolean::isEqual",
100100
"runtime_parameter_definitions": [
101101
{
102102
"data_type_identifier": "BOOLEAN",
103-
"runtime_name": "value"
103+
"runtime_name": "first"
104+
},
105+
{
106+
"data_type_identifier": "BOOLEAN",
107+
"runtime_name": "second"
104108
}
105109
],
106110
"return_type_identifier": "BOOLEAN"
@@ -109,6 +113,6 @@ Will negate the boolean.
109113

110114
**Example**:
111115

112-
false --> true
116+
false, false --> true
113117

114-
true --> false
118+
true, false --> false

definitions/functions/number-audit.md renamed to definitions/functions/primitive/number-audit.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,9 @@
6565

6666
## Added
6767
- asText
68+
69+
70+
# 06.05.2025
71+
72+
## Added
73+
- isEqual

0 commit comments

Comments
 (0)