Skip to content

Commit 3711924

Browse files
committed
docs(api): #15 complete
1 parent 791230e commit 3711924

File tree

9 files changed

+2773
-69
lines changed

9 files changed

+2773
-69
lines changed

docs/api/array.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ Our array schema is always dependent on others. Becasue, array is a collection o
77
## Table of Contents
88

99
- [Schema & Validators](#schema-and-validators)
10-
- [unique](#unique)
11-
- [min](#min)
12-
- [max](#max)
13-
- [range](#range)
14-
- [objects](#objects)
15-
- [enums](#enums)
10+
- [unique](#unique)
11+
- [min](#min)
12+
- [max](#max)
13+
- [range](#range)
14+
- [objects](#objects)
15+
- [enums](#enums)
1616
- [Conclusion](#conclusion)
1717

1818
## Schema and Validators
1919

20-
### Unique `.unique()`
20+
## `.unique()`
2121

2222
This validator is used to check if the array has unique values or not. If the array has duplicate values, it will return an error.
2323

@@ -91,7 +91,7 @@ console.log(resultOne, resultTow)
9191

9292
:::
9393

94-
### Min `.min()`
94+
## `.min()`
9595

9696
This validator is used to check if the array has a minimum number of elements or not. If the array has fewer elements than the specified number, it will return an error.
9797

@@ -159,7 +159,7 @@ console.log(resultOne, resultTow)
159159

160160
:::
161161

162-
### Max `.max()`
162+
## `.max()`
163163

164164
This validator is used to check if the array has a maximum number of elements or not. If the array has more elements than the specified number, it will return an error.
165165

@@ -227,7 +227,7 @@ console.log(resultOne, resultTow)
227227

228228
:::
229229

230-
### Range `.range()`
230+
## `.range()`
231231

232232
This validator is used to check if the array has a range of elements or not. If the array has fewer or more elements than the specified range, it will return an error.
233233

@@ -295,7 +295,7 @@ console.log(resultOne, resultTow)
295295

296296
:::
297297

298-
### Objects
298+
## Objects
299299

300300
This validator is used to check if the array has a specific object schema or not. If the array has an object that does not match the specified schema, it will return an error.
301301

@@ -399,7 +399,7 @@ You can also use the `min`, `max`, `range` validators with this object based sch
399399
400400
:::
401401
402-
### Enums
402+
## Enums
403403
404404
This validator is used to check if the array has specific values or not. If the array has a value that is not in the specified list, it will return an error.
405405

docs/api/boolean.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Boolean is a data type that can have one of two values: `true` or `false`.
77
## Table of Contents
88

99
- [Schema & Validators](#schema--validators)
10-
- [default](#default)
11-
- [exact](#exact)
10+
- [default](#default)
11+
- [exact](#exact)
1212
- [Conclusion](#conclusion)
1313

1414
## Schema & Validators
1515

16-
### default
16+
## default
1717

1818
By default, the boolean schema does not have any validators. It only checks if the value is a boolean.
1919

@@ -51,7 +51,7 @@ console.log(resultOne, resultTow)
5151
{ value: false }
5252
```
5353
54-
### exact `.exact(value: boolean)`
54+
## `.exact(value: boolean)`
5555
5656
The `exact` validator checks if the value is exactly equal to the provided value.
5757

docs/api/enum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Enum is a data type that can have one of a specific set of values. It is similar
77
## Table of Contents
88

99
- [Schema & Validators](#schema--validators)
10-
- [default](#default)
10+
- [default](#default)
1111
- [Conclusion](#conclusion)
1212

1313
## Schema & Validators
@@ -81,7 +81,7 @@ console.log(resultOne, resultTow, resultThree, resultFour)
8181
8282
:::
8383
84-
### default `.default(value: string)`
84+
## `.default(value: string)`
8585
8686
The `default` validator sets the default value of the schema if the value is `undefined`.
8787

docs/api/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
Welcome to the `Akar.js`. This page will walk you through the available API references of this library.
66

7-
::: info
8-
Work in progress ⏳
9-
:::
7+
## Table of Contents
8+
9+
- [Array](/api/array)
10+
- [Object](/api/object)
11+
- [String](/api/string)
12+
- [Number](/api/number)
13+
- [Enum](/api/enum)
14+
- [Boolean](/api/boolean)

docs/api/number.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ You can define a schema of a number using the `a.number()` method. This method w
77
## Table of Contents
88

99
- [Schema & Validators](#schema-and-validators)
10-
- [min](#min)
11-
- [max](#max)
12-
- [range](#range)
13-
- [integer](#integer)
14-
- [float](#float)
15-
- [unsigned](#unsigned)
16-
- [signed](#signed)
17-
- [odd](#odd)
18-
- [even](#even)
19-
- [divisibleBy](#divisibleby)
20-
- [port](#port)
21-
- [binary](#binary)
22-
- [octal](#octal)
23-
- [hex](#hex)
24-
- [prime](#prime)
25-
- [perfect](#perfect)
10+
- [min](#min)
11+
- [max](#max)
12+
- [range](#range)
13+
- [integer](#integer)
14+
- [float](#float)
15+
- [unsigned](#unsigned)
16+
- [signed](#signed)
17+
- [odd](#odd)
18+
- [even](#even)
19+
- [divisibleBy](#divisibleby)
20+
- [port](#port)
21+
- [binary](#binary)
22+
- [octal](#octal)
23+
- [hex](#hex)
24+
- [prime](#prime)
25+
- [perfect](#perfect)
2626
- [Conclusion](#conclusion)
2727

2828
## Schema and Validators
2929

30-
### min `.min(value: number)`
30+
## `.min(value: number)`
3131

3232
This validator is used to check if the number is greater than or equal to the specified value.
3333

@@ -72,7 +72,7 @@ console.log(resultOne, resultTow)
7272
}
7373
```
7474
75-
### max `.max(value: number)`
75+
## `.max(value: number)`
7676
7777
This validator is used to check if the number is less than or equal to the specified value.
7878
@@ -117,7 +117,7 @@ console.log(resultOne, resultTow)
117117
}
118118
```
119119
120-
### range `.range(min: number, max: number)`
120+
## `.range(min: number, max: number)`
121121
122122
This validator is used to check if the number is within the specified range.
123123
@@ -162,7 +162,7 @@ console.log(resultOne, resultTow)
162162
}
163163
```
164164
165-
### integer `.integer()`
165+
## `.integer()`
166166
167167
This validator is used to check if the number is an integer.
168168
@@ -207,7 +207,7 @@ console.log(resultOne, resultTow)
207207
}
208208
```
209209
210-
### float `.float()`
210+
## `.float()`
211211
212212
This validator is used to check if the number is a float.
213213
@@ -252,7 +252,7 @@ console.log(resultOne, resultTow)
252252
}
253253
```
254254
255-
### unsigned `.unsigned()`
255+
## `.unsigned()`
256256
257257
This validator is used to check if the number is an unsigned number.
258258
@@ -297,7 +297,7 @@ console.log(resultOne, resultTow)
297297
}
298298
```
299299
300-
### signed `.signed()`
300+
## `.signed()`
301301
302302
This validator is used to check if the number is a signed number.
303303
@@ -342,7 +342,7 @@ console.log(resultOne, resultTow)
342342
}
343343
```
344344
345-
### odd `.odd()`
345+
## `.odd()`
346346
347347
This validator is used to check if the number is an odd number.
348348
@@ -387,7 +387,7 @@ console.log(resultOne, resultTow)
387387
}
388388
```
389389
390-
### even `.even()`
390+
## `.even()`
391391
392392
This validator is used to check if the number is an even number.
393393
@@ -432,7 +432,7 @@ console.log(resultOne, resultTow)
432432
}
433433
```
434434
435-
### divisibleBy `.divisibleBy(value: number)`
435+
## `.divisibleBy(value: number)`
436436
437437
This validator is used to check if the number is divisible by the specified value.
438438
@@ -477,7 +477,7 @@ console.log(resultOne, resultTow)
477477
}
478478
```
479479
480-
### port `.port()`
480+
## `.port()`
481481
482482
This validator is used to check if the number is a valid port number.
483483
@@ -523,7 +523,7 @@ console.log(resultOne, resultTow)
523523
}
524524
```
525525
526-
### binary `.binary()`
526+
## `.binary()`
527527
528528
This validator is used to check if the number is a valid binary number.
529529
@@ -568,7 +568,7 @@ console.log(resultOne, resultTow)
568568
}
569569
```
570570
571-
### octal `.octal()`
571+
## `.octal()`
572572
573573
This validator is used to check if the number is a valid octal number.
574574
@@ -613,7 +613,7 @@ console.log(resultOne, resultTow)
613613
}
614614
```
615615
616-
### hex `.hex()`
616+
## `.hex()`
617617
618618
This validator is used to check if the number is a valid hexadecimal number.
619619
@@ -658,7 +658,7 @@ console.log(resultOne, resultTow)
658658
}
659659
```
660660
661-
### prime `.prime()`
661+
## `.prime()`
662662
663663
This validator is used to check if the number is a prime number.
664664
@@ -703,7 +703,7 @@ console.log(resultOne, resultTow)
703703
}
704704
```
705705
706-
### perfect `.perfect()`
706+
## `.perfect()`
707707
708708
This validator is used to check if the number is a perfect number.
709709

docs/api/object.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ The `Object` class is the base class for all objects in the game. It provides a
55
## Table of Contents
66

77
- [Schema & Validators](#schema-and-validators)
8-
- [EqualTo](#equal-to)
9-
- [DeepEqualTo](#not-equal-to)
10-
- [ShallowEqualTo](#shallow-equal-to)
11-
- [JsonObject](#json-object)
8+
- [EqualTo](#equal-to)
9+
- [DeepEqualTo](#not-equal-to)
10+
- [ShallowEqualTo](#shallow-equal-to)
11+
- [JsonObject](#json-object)
1212
- [Conclusion](#conclusion)
1313

1414
## Schema and Validators
1515

16-
### EqualTo `.equalTo()`
16+
## `.equalTo()`
1717

1818
This validator is used to check if the object is equal to the provided object or not. If the object is not equal to the provided object, it will return an error.
1919

@@ -88,7 +88,7 @@ console.log(resultOne, resultTow)
8888
}
8989
```
9090
91-
### DeepEqualTo `.deepEqualTo()`
91+
## `.deepEqualTo()`
9292
9393
This validator is used to check if the object is deeply equal to the provided object or not. If the object is not deeply equal to the provided object, it will return an error.
9494
@@ -163,7 +163,7 @@ console.log(resultOne, resultTow)
163163
}
164164
```
165165
166-
### ShallowEqualTo `.shallowEqualTo()`
166+
## `.shallowEqualTo()`
167167
168168
This validator is used to check if the object is shallowly equal to the provided object or not. If the object is not shallowly equal to the provided object, it will return an error.
169169
@@ -238,7 +238,7 @@ console.log(resultOne, resultTow)
238238
}
239239
```
240240
241-
### JsonObject `.jsonObject()`
241+
## `.jsonObject()`
242242
243243
This validator is used to check if the object is a valid JSON object or not. If the object is not a valid JSON object, it will return an error.
244244

0 commit comments

Comments
 (0)