Repository navigation
Expand file tree
/
Copy pathstructure.example
More file actions
93 lines (63 loc) · 1.99 KB
/
Copy pathstructure.example
File metadata and controls
93 lines (63 loc) · 1.99 KB
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
---
title: API Reference example
tags:
- utils
- class
- public
- global
toc_min_heading_level: 2
toc_max_heading_level: 3
---
import Type from '@site/docs/api/components/type';
# Name of Module
:::info
Current state: **Stable** | **Legacy** | **Deprecated**
:::
_**Stable** - can be use as is_
_**Legacy** - Old code that needs refactoring to match the current architecture of the code_
_**Deprecated** - Should **NOT** be used, this will be deleted anytime soon_
_Description with a general example on how to use this Class / Module_
## Class: Name of the class
### Public variable (e.g. in an EventEmitter class `Event: 'close'`)
### Static methods (e.g. `Static method: Class.default()`)
### `new Class()`
Instances of the Class class can be created using the new keyword.
```javascript
const myClass = new Class();
```
### `class.method(param1, param2)`
- `param1`: <Type>String</Type> (can be linked to other API doc page).
- `param2`: <Type>Object</Type>
- `options1`: <Type>Number</Type>
The `class.method()` method display the `param1` and then skip `param2` lines.
#### Examples
```javascript
const { Class } = require('pathToClassFile');
const textLines = ['Welcome', "That's all", 'Thanks'];
const classInstance = new Class();
for (const text of textLines) {
classInstance.method(text, 1);
}
// Prints:
// Welcome
// That's all
// Thanks
```
## Function: `name_of_the_function(param1, param2)`
- `param1`: <Type>String</Type> (can be linked to other API doc page)
- `param2`: <Type>Object</Type>
- `options1`: <Type>Number</Type>
The `name_of_the_function()` method display the `param1` and then skip `param2` lines.
#### Examples
```javascript
const { name_of_the_function } = require('pathToFunctionFile');
const textLines = ['Welcome', "That's all", 'Thanks'];
for (const text of textLines) {
name_of_the_function(text, 1);
}
// Prints:
// Welcome
// That's all
// Thanks
```
This structure is highly based on NodeJS API reference documentation. https://nodejs.org/api