aprog 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,100 @@
|
|
|
1
|
-
# aprog
|
|
1
|
+
# aprog
|
|
2
|
+
|
|
2
3
|
Допоміжна бібліотека js
|
|
4
|
+
|
|
5
|
+
*require for dev*
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install aprog --save-dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
npm i aprog -D
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Basic Usage
|
|
20
|
+
|
|
21
|
+
Приклад використання методів формування HTML елементів:
|
|
22
|
+
|
|
23
|
+
```shell
|
|
24
|
+
|
|
25
|
+
const elDiv = div({
|
|
26
|
+
id: "id-елементу",
|
|
27
|
+
class: "class-елементу",
|
|
28
|
+
style: {
|
|
29
|
+
width: "30px",
|
|
30
|
+
height: "40px"
|
|
31
|
+
},
|
|
32
|
+
onClick: () => {
|
|
33
|
+
console.log("Приклад роботи onClick");
|
|
34
|
+
},
|
|
35
|
+
value: "Приклад блоку div"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
document.body.appendChild(elDiv);
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Приклад використання методів дебагу:
|
|
43
|
+
|
|
44
|
+
```shell
|
|
45
|
+
|
|
46
|
+
const int = 0;
|
|
47
|
+
const array = [1,2,3,4];
|
|
48
|
+
const boolean = true;
|
|
49
|
+
|
|
50
|
+
// виводить всі змінні в одній групі вкладок
|
|
51
|
+
dump(int, array, boolean);
|
|
52
|
+
|
|
53
|
+
// or
|
|
54
|
+
|
|
55
|
+
// виводить всі змінні в одній групі вкладок та зупиняє подальше виконання скрипту
|
|
56
|
+
dd(int, array, boolean);
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Загальний список методів:
|
|
61
|
+
|
|
62
|
+
- *dump(...args), dd(...args)*
|
|
63
|
+
- *redirect(url, { newTab: bool, replace: bool })*
|
|
64
|
+
- *encrypt(str), decrypt(encryptedStr)*
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- *div, span, button, a, img, meta, label, input, select, option, options, form, hr, textarea, table, thead, tbody, tr, th, td, pre*
|
|
68
|
+
- *_get, GUID, apState, cookie, date, pause, apFetch, chars, elementToObject, copyText, scrollToTop, scrollToBottom, firstKey, checkArrays, ucfirst, deepEqual, nodeListToObject*
|
|
69
|
+
- *isEmpty, isNull, isFloat, isNumeric, isObject, isArray, isNumber, isString, isPromise, isNull, isFloat, isNumeric, isObject*
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Info
|
|
73
|
+
|
|
74
|
+
- З часом будуть додаватися можливості створення додаткових інструментів
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### License
|
|
78
|
+
MIT License
|
|
79
|
+
|
|
80
|
+
Copyright (c) 2025 AlexProger
|
|
81
|
+
|
|
82
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
83
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
84
|
+
in the Software without restriction, including without limitation the rights
|
|
85
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
86
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
87
|
+
furnished to do so, subject to the following conditions:
|
|
88
|
+
|
|
89
|
+
The above copyright notice and this permission notice shall be included in all
|
|
90
|
+
copies or substantial portions of the Software.
|
|
91
|
+
|
|
92
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
93
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
94
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
95
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
96
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
97
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
98
|
+
SOFTWARE.
|
|
99
|
+
|
|
100
|
+
*© AlexProger 2025*
|