Skip to content

Commit ccbf48a

Browse files
committed
feat: added primitive function definitions
1 parent 6d75ac3 commit ccbf48a

9 files changed

Lines changed: 503 additions & 175 deletions

File tree

definitions/data_types/array.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# All Data_Types of the Array Variant
2+
3+
## ARRAY
4+
```json
5+
{
6+
"variant": "ARRAY",
7+
"identifier": "ARRAY",
8+
"name": [
9+
{
10+
"code": "en-US",
11+
"content": "Array"
12+
}
13+
],
14+
}
15+
```
16+
## NUMBER_ARRAY
17+
18+
```json
19+
{
20+
"variant": "ARRAY",
21+
"identifier": "NUMBER_ARRAY",
22+
"name": [
23+
{
24+
"code": "en-US",
25+
"content": "Number Array"
26+
}
27+
],
28+
"rules": [
29+
{
30+
"config": {
31+
"contains_type": {
32+
"data_type_identifier": "NUMBER"
33+
}
34+
}
35+
}
36+
],
37+
"parent_type_identifier": "ARRAY"
38+
}
39+
```
40+
41+
## TEXT_ARRAY
42+
43+
```json
44+
{
45+
"variant": "ARRAY",
46+
"identifier": "TEXT_ARRAY",
47+
"name": [
48+
{
49+
"code": "en-US",
50+
"content": "Text Array"
51+
}
52+
],
53+
"rules": [
54+
{
55+
"config": {
56+
"contains_type": {
57+
"data_type_identifier": "TEXT"
58+
}
59+
}
60+
}
61+
],
62+
"parent_type_identifier": "ARRAY"
63+
}
64+
```
65+
66+
## BOOLEAN_ARRAY
67+
68+
```json
69+
{
70+
"variant": "ARRAY",
71+
"identifier": "BOOLEAN_ARRAY",
72+
"name": [
73+
{
74+
"code": "en-US",
75+
"content": "Boolean Array"
76+
}
77+
],
78+
"rules": [
79+
{
80+
"config": {
81+
"contains_type": {
82+
"data_type_identifier": "BOOLEAN"
83+
}
84+
}
85+
}
86+
],
87+
"parent_type_identifier": "ARRAY"
88+
}
89+
```
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# All Data_Types of the Primitive Variant
2+
3+
## NUMBER
4+
5+
```json
6+
{
7+
"variant": "PRIMITIVE",
8+
"identifier": "NUMBER",
9+
"name": [
10+
{
11+
"code": "en-US",
12+
"content": "Number"
13+
}
14+
],
15+
"rules": [
16+
{
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+
}
21+
}
22+
}
23+
]
24+
}
25+
```
26+
27+
28+
## TEXT
29+
30+
```json
31+
{
32+
"variant": "PRIMITIVE",
33+
"identifier": "TEXT",
34+
"name": [
35+
{
36+
"code": "en-US",
37+
"content": "Text"
38+
}
39+
],
40+
"rules": [
41+
{
42+
"config": {
43+
"regex": {
44+
"pattern": "[\s\S]*"
45+
}
46+
}
47+
}
48+
]
49+
}
50+
```
51+
52+
## BOOLEAN
53+
54+
```json
55+
{
56+
"variant": "PRIMITIVE",
57+
"identifier": "BOOLEAN",
58+
"name": [
59+
{
60+
"code": "en-US",
61+
"content": "Boolean"
62+
}
63+
],
64+
"rules": [
65+
{
66+
"config": {
67+
"regex": {
68+
"pattern": "^(true|false)$"
69+
}
70+
}
71+
}
72+
]
73+
}
74+
```

definitions/data_types/type.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# All Data_Types of the Type Variant
2+
3+
## NUMBER
4+
5+
```json
6+
{
7+
"variant": "Type",
8+
"identifier": "TEXT_ENCODING",
9+
"name": [
10+
{
11+
"code": "en-US",
12+
"content": "Text Encoding"
13+
}
14+
],
15+
"rules": [
16+
{
17+
"config": {
18+
"item_of_collection": {
19+
"items": [
20+
"ASCII",
21+
"UTF-8",
22+
"UTF-16",
23+
"UTF-32"
24+
]
25+
}
26+
}
27+
}
28+
]
29+
}
30+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 25.04.2025 - First Iteration
2+
3+
## Added
4+
- asNumber
5+
- asText
6+
- fromText
7+
- fromNumber
8+
- negate
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Will convert the boolean to a number.
88
"runtime_name": "std::boolean::as_number",
99
"runtime_parameter_definitions": [
1010
{
11-
"data_type_identifier": "PRIMITIVE",
11+
"data_type_identifier": "BOOLEAN",
1212
"runtime_name": "value"
1313
}
1414
],
15-
"return_type_identifier": "PRIMITIVE"
15+
"return_type_identifier": "NUMBER"
1616
}
1717
```
1818

@@ -30,11 +30,11 @@ Will convert the boolean to a string.
3030
"runtime_name": "std::boolean::as_text",
3131
"runtime_parameter_definitions": [
3232
{
33-
"data_type_identifier": "PRIMITIVE",
33+
"data_type_identifier": "BOOLEAN",
3434
"runtime_name": "value"
3535
}
3636
],
37-
"return_type_identifier": "PRIMITIVE"
37+
"return_type_identifier": "TEXT"
3838
}
3939
```
4040

@@ -53,11 +53,11 @@ Will convert the number to a boolean.
5353
"runtime_name": "std::boolean::from_number",
5454
"runtime_parameter_definitions": [
5555
{
56-
"data_type_identifier": "PRIMITIVE",
56+
"data_type_identifier": "NUMBER",
5757
"runtime_name": "value"
5858
}
5959
],
60-
"return_type_identifier": "PRIMITIVE"
60+
"return_type_identifier": "BOOLEAN"
6161
}
6262
```
6363

@@ -76,11 +76,11 @@ Will convert the string to a boolean.
7676
"runtime_name": "std::boolean::from_text",
7777
"runtime_parameter_definitions": [
7878
{
79-
"data_type_identifier": "PRIMITIVE",
79+
"data_type_identifier": "TEXT",
8080
"runtime_name": "value"
8181
}
8282
],
83-
"return_type_identifier": "PRIMITIVE"
83+
"return_type_identifier": "BOOLEAN"
8484
}
8585
```
8686

@@ -99,11 +99,11 @@ Will negate the boolean.
9999
"runtime_name": "std::boolean::negate",
100100
"runtime_parameter_definitions": [
101101
{
102-
"data_type_identifier": "PRIMITIVE",
102+
"data_type_identifier": "BOOLEAN",
103103
"runtime_name": "value"
104104
}
105105
],
106-
"return_type_identifier": "PRIMITIVE"
106+
"return_type_identifier": "BOOLEAN"
107107
}
108108
```
109109

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# 25.04.2025 - First Iteration
2+
3+
## Added
4+
5+
- add
6+
- multiply
7+
- subtract
8+
- divide
9+
- modulo
10+
- toPositive
11+
- toNegative
12+
- isNegative
13+
- isPositive
14+
- isGreater
15+
- isLess
16+
- isZero
17+
- square
18+
- exponential
19+
- PI
20+
- EULER
21+
- INFINITY
22+
- roundUp
23+
- roundDown
24+
- round
25+
- squareRoot
26+
- root
27+
- log
28+
- naturalLog
29+
- lim
30+
- parseNumber
31+
32+
# 27.04.2025 - Second Iteration
33+
34+
## Dropped:
35+
- lim
36+
- toNegative
37+
38+
## Renamed:
39+
- toPositive -> abs
40+
- naturalLog -> ln
41+
42+
## Added:
43+
- min
44+
- max
45+
- negate
46+
- randomNumber
47+
- sin
48+
- cos
49+
- tan
50+
- arcsin
51+
- arccos
52+
- arctan
53+
- sinh
54+
- cosh
55+
- clamp
56+
57+
## Should Consider:
58+
- isGreaterOrEqual
59+
- isLessOrEqual
60+
61+
# 28.04.2025 - Third Iteration
62+
63+
## Renamed:
64+
- parseNumber --> fromText
65+
66+
## Added
67+
- asText

0 commit comments

Comments
 (0)