dphelper 1.1.31 → 1.2.0
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/CHANGELOG.md +10 -0
- package/.github/FUNDING.yml +4 -4
- package/.github/HISTORY.md +121 -0
- package/.github/LICENSE.txt +21 -0
- package/.github/README.md +132 -0
- package/.github/SECURITY.md +3 -0
- package/FUNDING.yml +16 -0
- package/HISTORY.md +47 -42
- package/LICENSE.txt +21 -0
- package/README.md +25 -29
- package/index.d.ts +6 -1
- package/index.js +1 -1
- package/package.json +54 -32
- package/types/cache.d.ts +9 -0
- package/types/dphelper.d.ts +16 -19
- package/types/observer.d.ts +10 -0
- package/types/state.d.ts +44 -0
- package/types/store.d.ts +83 -0
- package/LICENSE.md +0 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Changelog
|
|
2
|
+
|
|
3
|
+
New minor (feature) releases of this app/software are released every six months and
|
|
4
|
+
patch (bugfix) releases are released every month. More information on the
|
|
5
|
+
release cycle: see package.json
|
|
6
|
+
|
|
7
|
+
## Previous
|
|
8
|
+
|
|
9
|
+
Please see the git history for the details of previous versions.
|
|
10
|
+
You can see HISTORY.md for all information.
|
package/.github/FUNDING.yml
CHANGED
|
@@ -10,7 +10,7 @@ liberapay: passariello
|
|
|
10
10
|
issuehunt: passariello
|
|
11
11
|
otechie: # Replace with a single Otechie username
|
|
12
12
|
custom:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
[
|
|
14
|
+
"https://dario.passariello.ca",
|
|
15
|
+
"https://www.indiegogo.com/individuals/28513718",
|
|
16
|
+
]
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v1.1.5 / 2024-08-07
|
|
4
|
+
|
|
5
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
6
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
7
|
+
|
|
8
|
+
## Previous
|
|
9
|
+
|
|
10
|
+
## v0.9.9 / 2024-06-02
|
|
11
|
+
|
|
12
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
13
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
14
|
+
|
|
15
|
+
## v0.9.0 / 2024-05-24
|
|
16
|
+
|
|
17
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
18
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
19
|
+
- Compatible state for react [Dario Passariello](https://github.com/passariello) ()
|
|
20
|
+
- Creation of observer [Dario Passariello](https://github.com/passariello) ()
|
|
21
|
+
- Now state use Proxy as event generator [Dario Passariello](https://github.com/passariello) ()
|
|
22
|
+
|
|
23
|
+
## v0.8.6 / 2024-05-17
|
|
24
|
+
|
|
25
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
26
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
27
|
+
- Move to ts files [Dario Passariello](https://github.com/passariello) ()
|
|
28
|
+
- Add type support [Dario Passariello](https://github.com/passariello) ()
|
|
29
|
+
- Compatible state for react [Dario Passariello](https://github.com/passariello) ()
|
|
30
|
+
|
|
31
|
+
## v0.7.7 / 2024-05-16
|
|
32
|
+
|
|
33
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
34
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
35
|
+
|
|
36
|
+
## v0.7.6 / 2024-04-19
|
|
37
|
+
|
|
38
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
39
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
40
|
+
|
|
41
|
+
## v0.7.5 / 2024-03-18
|
|
42
|
+
|
|
43
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
44
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
45
|
+
|
|
46
|
+
## v0.7.0 / 2024-03-18
|
|
47
|
+
|
|
48
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
49
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
50
|
+
|
|
51
|
+
## v0.5.6 / 2024-02-12
|
|
52
|
+
|
|
53
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
54
|
+
- Add TS capability [Dario Passariello](https://github.com/passariello) ()
|
|
55
|
+
- Mode index to app folder [Dario Passariello](https://github.com/passariello) ()
|
|
56
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
57
|
+
|
|
58
|
+
## v0.5.4 / 2024-02-10
|
|
59
|
+
|
|
60
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
61
|
+
|
|
62
|
+
## v0.5.3 / 2024-01-30
|
|
63
|
+
|
|
64
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
65
|
+
|
|
66
|
+
## v0.5.2 / 2024-01-06
|
|
67
|
+
|
|
68
|
+
- Add new functions [Dario Passariello](https://github.com/passariello) ()
|
|
69
|
+
- Bug fix [Dario Passariello](https://github.com/passariello) ()
|
|
70
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
71
|
+
|
|
72
|
+
## v0.5.0 / 2024-01-01
|
|
73
|
+
|
|
74
|
+
- Add dates functionalities [Dario Passariello](https://github.com/passariello) ()
|
|
75
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
76
|
+
|
|
77
|
+
## v0.4.91 / 2023-12-20
|
|
78
|
+
|
|
79
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
80
|
+
|
|
81
|
+
## v0.4.9 / 2023-12-12
|
|
82
|
+
|
|
83
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
84
|
+
- General bug fix [Dario Passariello](https://github.com/passariello) ()
|
|
85
|
+
- Fix document forlder issue [Dario Passariello](https://github.com/passariello) ()
|
|
86
|
+
|
|
87
|
+
## v0.4.8 / 2023-11-23
|
|
88
|
+
|
|
89
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
90
|
+
- Added split extension as dphelper.system [Dario Passariello](https://github.com/passariello) ()
|
|
91
|
+
- General bug fix [Dario Passariello](https://github.com/passariello) ()
|
|
92
|
+
- Removed documents folder from dist [Dario Passariello](https://github.com/passariello) ()
|
|
93
|
+
|
|
94
|
+
## v0.4.7 / 2023-11-11
|
|
95
|
+
|
|
96
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
97
|
+
|
|
98
|
+
## v0.4.6 / 2023-11-08
|
|
99
|
+
|
|
100
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
101
|
+
|
|
102
|
+
## v0.4.5 / 2023-11-08
|
|
103
|
+
|
|
104
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
105
|
+
|
|
106
|
+
## v0.4.4 / 2023-10-25
|
|
107
|
+
|
|
108
|
+
- Change license from CC BY-NC-ND 4.0 to MIT [Dario Passariello](https://github.com/passariello) ()
|
|
109
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
110
|
+
|
|
111
|
+
## v0.4.3 / 2023-10-18
|
|
112
|
+
|
|
113
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
114
|
+
|
|
115
|
+
## v0.4.2 / 2023-10-09
|
|
116
|
+
|
|
117
|
+
- Fix some minor bugs [Dario Passariello](https://github.com/passariello) ()
|
|
118
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
119
|
+
- Change license Apache-2.0 to MIT
|
|
120
|
+
|
|
121
|
+
Please see the git history for the details of previous versions.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Dario Passariello
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# I am dpHelper
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
dpHelper Devtools by Dario Passariello
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
Manager | DevTools by [Dario Passariello (c)](https://dario.passariello.ca)
|
|
10
|
+
|
|
11
|
+
<!--  -->
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+
<!--  -->
|
|
21
|
+
<!--  -->
|
|
22
|
+
<!--  -->
|
|
23
|
+
|
|
24
|
+
## About 🔥
|
|
25
|
+
|
|
26
|
+
dpHelper is a pricise and complete collection of functions ready to use in all web application. State and Store Management are now easy and global. Just for example **state.myData = "hello world"** and your string is ready everywhere in your Ajax or React app. It's more easy and intuitive of Redux.
|
|
27
|
+
You don't need to creare any extra files, dispatch or reducer.
|
|
28
|
+
|
|
29
|
+
Please, read the [LICENSE](/LICENSE.txt) agreement before to implementing in your application.
|
|
30
|
+
|
|
31
|
+
## Live demo
|
|
32
|
+
|
|
33
|
+
[https://a51.dev/tests/](https://a51.dev/tests/)
|
|
34
|
+
|
|
35
|
+
You can see an HTML version where dpHelper and LayerPro works.
|
|
36
|
+
You can use with html, react, vue or any other frontend / library.
|
|
37
|
+
|
|
38
|
+
## The Best Way To Use State and Store 💥
|
|
39
|
+
|
|
40
|
+
You can use "state" to store all what you want and reuse everywhere. Like other state manager you can store information in JSON format and you can use them in react, useEffect, dispatch in a very easy way.
|
|
41
|
+
|
|
42
|
+
_example:_
|
|
43
|
+
|
|
44
|
+
You can use devtools in your browser and type " **state.test = 'I am ready'** ".
|
|
45
|
+
Every time you want to use '**test**' you need just recall **state.test**.
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
state.test = "I am ready";
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
recall
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
state.test
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
To see all states just use
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
state
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Observer 😎
|
|
64
|
+
|
|
65
|
+
If you want to run a funtion everytime a state change you can use:
|
|
66
|
+
|
|
67
|
+
```javascript
|
|
68
|
+
observer("test",()=>alert("Test Changes to: " + state.test))
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
You can use it everywere. Works like "useState" in react but with more flexibility
|
|
72
|
+
|
|
73
|
+
## State vs Store 🎅
|
|
74
|
+
|
|
75
|
+
**INFO**: if you want to use as permanent storage (localStorage) you need to use " **store.** " instead state.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Install for react + webpack projects
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
npm i dphelper --save-dev
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
or update:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
npm i dphelper@latest --save-dev
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
in the index (and only there):
|
|
92
|
+
|
|
93
|
+
```javascript
|
|
94
|
+
import "dphelper";
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
or
|
|
98
|
+
|
|
99
|
+
```javascript
|
|
100
|
+
require("dphelper");
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Install for ejs or other type of projects (like html)
|
|
104
|
+
|
|
105
|
+
note: you don't need to use npm install in this case or you get an error
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<script src="https://unpkg.com/dphelper@latest/index.js"></script>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## How to use it
|
|
112
|
+
|
|
113
|
+
type 'dphelper' in your dev console to have a look about all available tools that you can use globaly!
|
|
114
|
+
|
|
115
|
+
You can call these from everywhere without import (just one at index)
|
|
116
|
+
|
|
117
|
+
## Browser Extension (Chrome/Edge) ♥️
|
|
118
|
+
|
|
119
|
+

|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+

|
|
124
|
+
|
|
125
|
+
Chrome: [Download from Google Web Store](https://chrome.google.com/webstore/detail/dphelper-manager-dev-tool/oppppldaoknfddeikfloonnialijngbk)
|
|
126
|
+
Edge: [Download from Microsoft Addons](https://microsoftedge.microsoft.com/addons/detail/dphelper-manager-dev-to/kphabkbdpaljlfagldhojilhfammepnk)
|
|
127
|
+
|
|
128
|
+
This extension allows you to manage your app's dpHelper NPM. Here you will find all the tools with description and methods of use. Designed to simplify API operations, data manipulation and retention. You will be able to monitor memory usage and localStorage. You will always be updated on updates and tricks for your daily work. The dpHelper tool is a collection of scripts to simplify, improve and speed up your work. Designed to be easy to install and use. Just use "import 'dphelper'" in your project index. All scripts work in global and are reachable everywhere.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
copyright (c) 2019 - 2024 by Dario Passariello
|
package/FUNDING.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: passariello
|
|
4
|
+
patreon: passariello
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: passariello
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: passariello
|
|
10
|
+
issuehunt: passariello
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom:
|
|
13
|
+
[
|
|
14
|
+
"https://dario.passariello.ca",
|
|
15
|
+
"https://www.indiegogo.com/individuals/28513718",
|
|
16
|
+
]
|
package/HISTORY.md
CHANGED
|
@@ -1,98 +1,103 @@
|
|
|
1
|
-
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## v1.1.5 / 2024-08-07
|
|
4
4
|
|
|
5
|
-
- NPM update
|
|
6
|
-
- Fix some bugs
|
|
5
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
6
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
7
7
|
|
|
8
8
|
## Previous
|
|
9
9
|
|
|
10
|
+
## v0.9.9 / 2024-06-02
|
|
11
|
+
|
|
12
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
13
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
14
|
+
|
|
10
15
|
## v0.9.0 / 2024-05-24
|
|
11
16
|
|
|
12
|
-
- NPM update
|
|
13
|
-
- Fix some bugs
|
|
14
|
-
- Compatible state for react
|
|
15
|
-
- Creation of observer
|
|
16
|
-
- Now state use Proxy as event generator
|
|
17
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
18
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
19
|
+
- Compatible state for react [Dario Passariello](https://github.com/passariello) ()
|
|
20
|
+
- Creation of observer [Dario Passariello](https://github.com/passariello) ()
|
|
21
|
+
- Now state use Proxy as event generator [Dario Passariello](https://github.com/passariello) ()
|
|
17
22
|
|
|
18
23
|
## v0.8.6 / 2024-05-17
|
|
19
24
|
|
|
20
|
-
- NPM update
|
|
21
|
-
- Fix some bugs
|
|
22
|
-
- Move to ts files
|
|
23
|
-
- Add type support
|
|
24
|
-
- Compatible state for react
|
|
25
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
26
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
27
|
+
- Move to ts files [Dario Passariello](https://github.com/passariello) ()
|
|
28
|
+
- Add type support [Dario Passariello](https://github.com/passariello) ()
|
|
29
|
+
- Compatible state for react [Dario Passariello](https://github.com/passariello) ()
|
|
25
30
|
|
|
26
31
|
## v0.7.7 / 2024-05-16
|
|
27
32
|
|
|
28
|
-
- NPM update
|
|
29
|
-
- Fix some bugs
|
|
33
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
34
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
30
35
|
|
|
31
36
|
## v0.7.6 / 2024-04-19
|
|
32
37
|
|
|
33
|
-
- NPM update
|
|
34
|
-
- Fix some bugs
|
|
38
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
39
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
35
40
|
|
|
36
41
|
## v0.7.5 / 2024-03-18
|
|
37
42
|
|
|
38
|
-
- NPM update
|
|
39
|
-
- Fix some bugs
|
|
43
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
44
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
40
45
|
|
|
41
46
|
## v0.7.0 / 2024-03-18
|
|
42
47
|
|
|
43
|
-
- NPM update
|
|
44
|
-
- Fix some bugs
|
|
48
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
49
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
45
50
|
|
|
46
51
|
## v0.5.6 / 2024-02-12
|
|
47
52
|
|
|
48
|
-
- NPM update
|
|
49
|
-
- Add TS capability
|
|
50
|
-
- Mode index to app folder
|
|
51
|
-
- Fix some bugs
|
|
53
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
54
|
+
- Add TS capability [Dario Passariello](https://github.com/passariello) ()
|
|
55
|
+
- Mode index to app folder [Dario Passariello](https://github.com/passariello) ()
|
|
56
|
+
- Fix some bugs [Dario Passariello](https://github.com/passariello) ()
|
|
52
57
|
|
|
53
58
|
## v0.5.4 / 2024-02-10
|
|
54
59
|
|
|
55
|
-
- NPM update
|
|
60
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
56
61
|
|
|
57
62
|
## v0.5.3 / 2024-01-30
|
|
58
63
|
|
|
59
|
-
- NPM update
|
|
64
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
60
65
|
|
|
61
66
|
## v0.5.2 / 2024-01-06
|
|
62
67
|
|
|
63
|
-
- Add new functions
|
|
64
|
-
- Bug fix
|
|
65
|
-
- NPM update
|
|
68
|
+
- Add new functions [Dario Passariello](https://github.com/passariello) ()
|
|
69
|
+
- Bug fix [Dario Passariello](https://github.com/passariello) ()
|
|
70
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
66
71
|
|
|
67
72
|
## v0.5.0 / 2024-01-01
|
|
68
73
|
|
|
69
|
-
- Add dates functionalities
|
|
70
|
-
- NPM update
|
|
74
|
+
- Add dates functionalities [Dario Passariello](https://github.com/passariello) ()
|
|
75
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
71
76
|
|
|
72
77
|
## v0.4.91 / 2023-12-20
|
|
73
78
|
|
|
74
|
-
- NPM update
|
|
79
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
75
80
|
|
|
76
81
|
## v0.4.9 / 2023-12-12
|
|
77
82
|
|
|
78
|
-
- NPM update
|
|
79
|
-
- General bug fix
|
|
83
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
84
|
+
- General bug fix [Dario Passariello](https://github.com/passariello) ()
|
|
80
85
|
- Fix document forlder issue [Dario Passariello](https://github.com/passariello) ()
|
|
81
86
|
|
|
82
87
|
## v0.4.8 / 2023-11-23
|
|
83
88
|
|
|
84
|
-
- NPM update
|
|
85
|
-
- Added split extension as dphelper.system
|
|
86
|
-
- General bug fix
|
|
87
|
-
- Removed documents folder from dist
|
|
89
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
90
|
+
- Added split extension as dphelper.system [Dario Passariello](https://github.com/passariello) ()
|
|
91
|
+
- General bug fix [Dario Passariello](https://github.com/passariello) ()
|
|
92
|
+
- Removed documents folder from dist [Dario Passariello](https://github.com/passariello) ()
|
|
88
93
|
|
|
89
94
|
## v0.4.7 / 2023-11-11
|
|
90
95
|
|
|
91
|
-
- NPM update
|
|
96
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
92
97
|
|
|
93
98
|
## v0.4.6 / 2023-11-08
|
|
94
99
|
|
|
95
|
-
- NPM update
|
|
100
|
+
- NPM update [Dario Passariello](https://github.com/passariello) ()
|
|
96
101
|
|
|
97
102
|
## v0.4.5 / 2023-11-08
|
|
98
103
|
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Dario Passariello
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -8,25 +8,25 @@ dpHelper Devtools by Dario Passariello
|
|
|
8
8
|
|
|
9
9
|
Manager | DevTools by [Dario Passariello (c)](https://dario.passariello.ca)
|
|
10
10
|
|
|
11
|
-

|
|
11
|
+
<!--  -->
|
|
12
12
|

|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|

|
|
17
|
-

|
|
18
|
-

|
|
19
17
|

|
|
20
|
-

|
|
21
18
|

|
|
22
19
|

|
|
20
|
+
<!--  -->
|
|
21
|
+
<!--  -->
|
|
22
|
+
<!--  -->
|
|
23
23
|
|
|
24
|
-
## About
|
|
24
|
+
## About 🔥
|
|
25
25
|
|
|
26
|
-
dpHelper is a pricise and complete collection of functions ready to use in all web application. State and Store Management are now easy and global. Just for example
|
|
27
|
-
You don't need to creare any extra files, dispatch or reducer
|
|
26
|
+
dpHelper is a pricise and complete collection of functions ready to use in all web application. State and Store Management are now easy and global. Just for example **state.myData = "hello world"** and your string is ready everywhere in your Ajax or React app. It's more easy and intuitive of Redux.
|
|
27
|
+
You don't need to creare any extra files, dispatch or reducer.
|
|
28
28
|
|
|
29
|
-
Please, read the [LICENSE](/LICENSE.
|
|
29
|
+
Please, read the [LICENSE](/LICENSE.txt) agreement before to implementing in your application.
|
|
30
30
|
|
|
31
31
|
## Live demo
|
|
32
32
|
|
|
@@ -35,7 +35,7 @@ Please, read the [LICENSE](/LICENSE.md) agreement before to implementing in your
|
|
|
35
35
|
You can see an HTML version where dpHelper and LayerPro works.
|
|
36
36
|
You can use with html, react, vue or any other frontend / library.
|
|
37
37
|
|
|
38
|
-
## The Best Way To Use State
|
|
38
|
+
## The Best Way To Use State and Store 💥
|
|
39
39
|
|
|
40
40
|
You can use "state" to store all what you want and reuse everywhere. Like other state manager you can store information in JSON format and you can use them in react, useEffect, dispatch in a very easy way.
|
|
41
41
|
|
|
@@ -51,18 +51,28 @@ state.test = "I am ready";
|
|
|
51
51
|
recall
|
|
52
52
|
|
|
53
53
|
```javascript
|
|
54
|
-
state.test
|
|
54
|
+
state.test
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
To see all states just use
|
|
58
58
|
|
|
59
59
|
```javascript
|
|
60
|
-
state
|
|
60
|
+
state
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
## Observer 😎
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
If you want to run a funtion everytime a state change you can use:
|
|
66
|
+
|
|
67
|
+
```javascript
|
|
68
|
+
observer("test",()=>alert("Test Changes to: " + state.test))
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
You can use it everywere. Works like "useState" in react but with more flexibility
|
|
72
|
+
|
|
73
|
+
## State vs Store 🎅
|
|
74
|
+
|
|
75
|
+
**INFO**: if you want to use as permanent storage (localStorage) you need to use " **store.** " instead state.
|
|
66
76
|
|
|
67
77
|
---
|
|
68
78
|
|
|
@@ -100,25 +110,11 @@ note: you don't need to use npm install in this case or you get an error
|
|
|
100
110
|
|
|
101
111
|
## How to use it
|
|
102
112
|
|
|
103
|
-
type 'dphelper' in your console to have a look about all available tools that you can use globaly!
|
|
104
|
-
|
|
105
|
-
You can call these from everywhere without import (just one at index)
|
|
106
|
-
|
|
107
|
-
## Instance it
|
|
108
|
-
|
|
109
|
-
You can istance dpHelper to make it more short command.
|
|
110
|
-
|
|
111
|
-
Example:
|
|
112
|
-
|
|
113
|
-
```javascript
|
|
114
|
-
window.dph = window.dphelper || {};
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Copy this at top of your index page to be global
|
|
113
|
+
type 'dphelper' in your dev console to have a look about all available tools that you can use globaly!
|
|
118
114
|
|
|
119
115
|
You can call these from everywhere without import (just one at index)
|
|
120
116
|
|
|
121
|
-
## Browser Extension (Chrome/Edge)
|
|
117
|
+
## Browser Extension (Chrome/Edge) ♥️
|
|
122
118
|
|
|
123
119
|

|
|
124
120
|
|
package/index.d.ts
CHANGED
|
@@ -3,5 +3,10 @@ Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
|
3
3
|
License: MIT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
/// <reference path="./types/dphelper.d.ts" />
|
|
7
6
|
/// <reference path="./types/jquery.d.ts" />
|
|
7
|
+
|
|
8
|
+
/// <reference path="./types/dphelper.d.ts" />
|
|
9
|
+
/// <reference path="./types/observer.d.ts" />
|
|
10
|
+
/// <reference path="./types/cache.d.ts" />
|
|
11
|
+
/// <reference path="./types/state.d.ts" />
|
|
12
|
+
/// <reference path="./types/store.d.ts" />
|