dphelper 1.2.6 → 1.2.7

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/.github/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![dpHelper](https://raw.githubusercontent.com/passariello/dphelper/HEAD/assets/logos/logo.svg)
4
4
 
5
- Manager | DevTools by [Dario Passariello](https://dario.passariello.ca) (c)
5
+ **Manager | DevTools** by [Dario Passariello](https://dario.passariello.ca) (c)
6
6
 
7
7
  <!-- ![git repository](https://img.shields.io/badge/git%20repository-updated-green.svg) -->
8
8
  ![browser extension](https://img.shields.io/badge/browser%20extension-beta-orange.svg)
@@ -26,12 +26,14 @@ You can use with html, react, vue or any other frontend / library.
26
26
  ## What you need to know about "no-refresh/reload" 🧐
27
27
 
28
28
  dpHelper is designed to work primaly with website, application and portals that use "AJAX / XMLHttpRequest" technology like PWA, SPA, Angular, React, JQuery etc.
29
- What mean?... So, modern browser and modern application use "NO REFRESH" behavior and these render only the part of browser needs changes instead re-render o refresh the entire page. Refresh o reload the entire page cause the lose of entire "states" ... my suggestion is to redesign/rewamp you code using a technology more robust and faster. So, if you want to use dpHelper as state / store moanager you can use only store function in a non Ajax engine. Feel free to contact me in case you need support or more information.
29
+ What mean?... So, modern browser and modern application use "NO REFRESH" behavior and these render only the part of browser needs changes instead re-render o refresh the entire page. Refresh o reload the entire page cause the lose of entire "states" ... my suggestion is to redesign/rewamp you code using a technology more robust and faster. So, if you want to use dpHelper as state / store manager you can use only store function in a non Ajax engine. Feel free to contact me in case you need support or more information.
30
30
 
31
31
  Here some links for you:
32
32
 
33
33
  [https://en.wikipedia.org/wiki/Ajax_(programming)](Ajax_(programming))
34
+
34
35
  [https://developer.mozilla.org/en-US/docs/Glossary/SPA](SPA (Single-page application))
36
+
35
37
  [https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest](XMLHttpRequest)
36
38
 
37
39
  I am no a techGuy | nerd | geek? ... no worries. Fix it... go to hiring one 🤭
@@ -46,7 +48,7 @@ You can use browser's devtools console and type " **state.test = 'I am ready'**
46
48
  Every time you want to use '**test**' values you need just recall **state.test**.
47
49
 
48
50
  ```javascript
49
- / Set a state
51
+ // Set a state
50
52
  state.test = "I am ready";
51
53
 
52
54
  // Get the state
@@ -61,7 +63,12 @@ state
61
63
  If you want to run a funtion everytime a state change you can use:
62
64
 
63
65
  ```javascript
64
- // Observer is a non cumulative listener, is trigged from customEvent / dispatch from state
66
+ /**
67
+ * Observer is a non cumulative listener,
68
+ * is trigged from customEvent / dispatch from state
69
+ * @parameters
70
+ * [ name, function ]
71
+ */
65
72
  observer("test", ()=> alert( "Test Changes to: " + state.test ) )
66
73
  ```
67
74
 
@@ -72,7 +79,7 @@ You can use it everywere. Works like "useState" in react but with more flexibili
72
79
  **INFO**: if you want to use as permanent storage (localStorage) you need to use " **store** " instead state.
73
80
  **IMPORTANT**: Store use localStorage... data are persistant and you need to remove if necessary for security (like logout)
74
81
 
75
- **SECURITY**: Do not store any sensitive data. Data stay in the computer if are not properly removed
82
+ **SECURITY**: Do not store any sensitive data. Data stay in the computer if are not properly removed ( use store.clearAll() )
76
83
 
77
84
  ```javascript
78
85
  // Set a store:
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![dpHelper](https://raw.githubusercontent.com/passariello/dphelper/HEAD/assets/logos/logo.svg)
4
4
 
5
- Manager | DevTools by [Dario Passariello](https://dario.passariello.ca) (c)
5
+ **Manager | DevTools** by [Dario Passariello](https://dario.passariello.ca) (c)
6
6
 
7
7
  <!-- ![git repository](https://img.shields.io/badge/git%20repository-updated-green.svg) -->
8
8
  ![browser extension](https://img.shields.io/badge/browser%20extension-beta-orange.svg)
@@ -26,12 +26,14 @@ You can use with html, react, vue or any other frontend / library.
26
26
  ## What you need to know about "no-refresh/reload" 🧐
27
27
 
28
28
  dpHelper is designed to work primaly with website, application and portals that use "AJAX / XMLHttpRequest" technology like PWA, SPA, Angular, React, JQuery etc.
29
- What mean?... So, modern browser and modern application use "NO REFRESH" behavior and these render only the part of browser needs changes instead re-render o refresh the entire page. Refresh o reload the entire page cause the lose of entire "states" ... my suggestion is to redesign/rewamp you code using a technology more robust and faster. So, if you want to use dpHelper as state / store moanager you can use only store function in a non Ajax engine. Feel free to contact me in case you need support or more information.
29
+ What mean?... So, modern browser and modern application use "NO REFRESH" behavior and these render only the part of browser needs changes instead re-render o refresh the entire page. Refresh o reload the entire page cause the lose of entire "states" ... my suggestion is to redesign/rewamp you code using a technology more robust and faster. So, if you want to use dpHelper as state / store manager you can use only store function in a non Ajax engine. Feel free to contact me in case you need support or more information.
30
30
 
31
31
  Here some links for you:
32
32
 
33
33
  [https://en.wikipedia.org/wiki/Ajax_(programming)](Ajax_(programming))
34
+
34
35
  [https://developer.mozilla.org/en-US/docs/Glossary/SPA](SPA (Single-page application))
36
+
35
37
  [https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest](XMLHttpRequest)
36
38
 
37
39
  I am no a techGuy | nerd | geek? ... no worries. Fix it... go to hiring one 🤭
@@ -46,7 +48,7 @@ You can use browser's devtools console and type " **state.test = 'I am ready'**
46
48
  Every time you want to use '**test**' values you need just recall **state.test**.
47
49
 
48
50
  ```javascript
49
- / Set a state
51
+ // Set a state
50
52
  state.test = "I am ready";
51
53
 
52
54
  // Get the state
@@ -61,7 +63,12 @@ state
61
63
  If you want to run a funtion everytime a state change you can use:
62
64
 
63
65
  ```javascript
64
- // Observer is a non cumulative listener, is trigged from customEvent / dispatch from state
66
+ /**
67
+ * Observer is a non cumulative listener,
68
+ * is trigged from customEvent / dispatch from state
69
+ * @parameters
70
+ * [ name, function ]
71
+ */
65
72
  observer("test", ()=> alert( "Test Changes to: " + state.test ) )
66
73
  ```
67
74
 
@@ -72,7 +79,7 @@ You can use it everywere. Works like "useState" in react but with more flexibili
72
79
  **INFO**: if you want to use as permanent storage (localStorage) you need to use " **store** " instead state.
73
80
  **IMPORTANT**: Store use localStorage... data are persistant and you need to remove if necessary for security (like logout)
74
81
 
75
- **SECURITY**: Do not store any sensitive data. Data stay in the computer if are not properly removed
82
+ **SECURITY**: Do not store any sensitive data. Data stay in the computer if are not properly removed ( use store.clearAll() )
76
83
 
77
84
  ```javascript
78
85
  // Set a store: