dphelper 1.2.4 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "displayName": "dphelper",
5
5
  "description": "dphelper devtools | tools, store and state management brave developers by Dario Passariello",
6
6
  "copyright": "Dario Passariello",
@@ -175,8 +175,6 @@
175
175
  "tsc": "tsc -b",
176
176
  "oxlint": "oxlint --config=./.eslintrc.json --tsconfig=./tsconfig.json",
177
177
  "---": "------------",
178
- "jsdoc": "jsdoc -r -c ./jsdoc.json",
179
- "jsdoc1": "jsdoc -r -c ./jsdoc.json && jsdoc2md --files index.js > docs/doc.md",
180
178
  "pack": "cd dist && npm pack",
181
179
  "backup": "cd mcp/batch && backup.bat",
182
180
  "update": "cd mcp/javascripts && node npmUpdate"
@@ -189,9 +187,7 @@
189
187
  "@babel/preset-react": "7.24.7",
190
188
  "@babel/preset-typescript": "7.24.7",
191
189
  "@babel/runtime": "^7.25.0",
192
- "@types/node": "22.3.0",
193
- "@types/react": "^18.3.3",
194
- "@types/react-dom": "^18.3.0",
190
+ "@types/node": "22.4.0",
195
191
  "@types/webpack-env": "1.18.5",
196
192
  "babel-loader": "9.1.3",
197
193
  "compression-webpack-plugin": "11.1.0",
@@ -199,24 +195,10 @@
199
195
  "crypto-js": "4.2.0",
200
196
  "css": "3.0.0",
201
197
  "css-loader": "^7.1.2",
202
- "dotenv": "^16.4.5",
203
198
  "file-loader": "6.2.0",
204
- "fs": "0.0.1-security",
205
199
  "html-webpack-plugin": "5.6.0",
206
200
  "jquery": "3.7.1",
207
- "jsdoc": "4.0.3",
208
- "jsdoc-babel": "0.5.0",
209
- "jsdoc-to-markdown": "8.0.3",
210
- "jsdom-worker": "0.3.0",
211
- "jshint": "^2.13.6",
212
- "less": "4.2.0",
213
- "less-loader": "^12.2.0",
214
- "path": "^0.12.7",
215
201
  "progress-bar-webpack-plugin": "2.1.0",
216
- "react": "18.3.1",
217
- "react-dom": "18.3.1",
218
- "react-router": "^6.26.0",
219
- "react-router-dom": "^6.26.0",
220
202
  "sass": "^1.77.8",
221
203
  "sass-loader": "^16.0.0",
222
204
  "style-loader": "^4.0.0",
package/types/cache.d.ts CHANGED
@@ -8,6 +8,15 @@ License: MIT
8
8
  * @return Some stuff you cache... usually used for dynamic imports from dpHelper.
9
9
  */
10
10
  interface dpCache {
11
+
12
+ /**
13
+ * Create a cache, please use state instead!
14
+ *
15
+ * @example
16
+ * cache.myCache = any
17
+ *
18
+ * @since dpHelper 1.0.6
19
+ */
11
20
  [key: string]: any
12
21
  }
13
22
 
@@ -1,12 +1,42 @@
1
+ /*
2
+ Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
3
+ License: MIT
4
+ */
5
+
1
6
  /**
2
7
  * Observer run a callback anytime the associated state going to change
3
8
  * @return Execution of function after state change.
4
9
  */
5
10
  interface dpObserver {
6
11
 
12
+ /**
13
+ * Generate your observer
14
+ *
15
+ * @example
16
+ * observer("myState", Function)
17
+ *
18
+ * @since dpHelper 1.0.6
19
+ */
7
20
  (stateName: string, callBack): Any
8
21
 
22
+ /**
23
+ * List of active observers
24
+ *
25
+ * @example
26
+ * observer.list()
27
+ *
28
+ * @since dpHelper 1.0.6
29
+ */
9
30
  readonly list?: () => void
31
+
32
+ /**
33
+ * Remove the active observer (not the state)
34
+ *
35
+ * @example
36
+ * observer.remove("myState")
37
+ *
38
+ * @since dpHelper 1.0.6
39
+ */
10
40
  readonly remove?: (name: string, callBack, flag?: bool[]) => void
11
41
 
12
42
  }
package/types/state.d.ts CHANGED
@@ -6,6 +6,10 @@ interface dpState {
6
6
 
7
7
  /**
8
8
  * Create states using: state.test = "example"
9
+ *
10
+ * @example
11
+ * state.myStuff = any
12
+ *
9
13
  * @since dpHelper 0.0.1
10
14
  * @param key The name of the state for which you want to modify the action.
11
15
  * @return The previous values (Any).
@@ -15,6 +19,10 @@ interface dpState {
15
19
 
16
20
  /**
17
21
  * Delete entire state using: state.remove("test")
22
+ *
23
+ * @example
24
+ * state.remove(any)
25
+ *
18
26
  * @since dpHelper 0.0.1
19
27
  * @param stateName The name of the state for which you want to delete.
20
28
  * @return boolean.
@@ -23,6 +31,10 @@ interface dpState {
23
31
 
24
32
  /**
25
33
  * List all states using: state.list
34
+ *
35
+ * @example
36
+ * state.list
37
+ *
26
38
  * @since dpHelper 0.0.1
27
39
  * @return Object of all states (Not the Proxy).
28
40
  */
@@ -30,8 +42,8 @@ interface dpState {
30
42
 
31
43
  /**
32
44
  * Generate a message for "dpHelper Manage"
45
+ * Note: FOR INTERNAL USE ONLY.
33
46
  * @since dpHelper 0.0.1
34
- * Important: FOR INTERNAL USE ONLY.
35
47
  */
36
48
  readonly mex: (prop: { property: string, value: string }) => any
37
49
 
package/types/store.d.ts CHANGED
@@ -14,7 +14,7 @@ interface dpStore {
14
14
  * @param param The information taht you want to store (Any).
15
15
  * @return boolean
16
16
  */
17
- readonly set: (name: string, param: any) => any
17
+ set(name: string, param: any): any
18
18
 
19
19
  /**
20
20
  * Have back the data from a store.
@@ -25,7 +25,7 @@ interface dpStore {
25
25
  * @since dpHelper 0.0.1
26
26
  * @param name The String as name to define the store.
27
27
  */
28
- readonly get: (name: string) => any
28
+ get(name: string): any
29
29
 
30
30
  /**
31
31
  * Delete an existing store:
@@ -37,7 +37,7 @@ interface dpStore {
37
37
  * @param name The String as name to define the store.
38
38
  * @return boolean
39
39
  */
40
- readonly delete: (name: string) => any
40
+ delete(name: string): any
41
41
 
42
42
  /**
43
43
  * Delete all storages
@@ -48,7 +48,7 @@ interface dpStore {
48
48
  * @since dpHelper 0.0.1
49
49
  * @return boolean
50
50
  */
51
- readonly clearAll: () => void
51
+ clearAll(): any
52
52
 
53
53
  /**
54
54
  * Know how much space you have for total storages
@@ -59,7 +59,7 @@ interface dpStore {
59
59
  * @since dpHelper 0.0.1
60
60
  * @return values
61
61
  */
62
- readonly quota: () => void
62
+ quota(): any
63
63
 
64
64
  /**
65
65
  * Get the size of stores an the total
@@ -70,7 +70,7 @@ interface dpStore {
70
70
  * @since dpHelper 0.0.1
71
71
  * @return dimension in kb
72
72
  */
73
- readonly size: () => any
73
+ size(): any
74
74
 
75
75
  // TODO
76
76
  // readonly increaseQuota: (value: number) => void