dphelper 1.8.80 → 1.8.90

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 CHANGED
@@ -116,16 +116,25 @@ You can use the browser's devtools console and type " **state.test = 'I am ready
116
116
 
117
117
  ```javascript
118
118
  // Set a state
119
- state.test = "I am ready";
119
+ state.test = "I am ready" *
120
120
 
121
121
  // Get the state
122
- state.test
122
+ state.test *
123
123
 
124
124
  // List all states
125
125
  state.list // or just "state" to see the proxy
126
126
 
127
+ // Lock a state from edit (Only for Objects or Array)
128
+ state.test.lock() *
129
+
127
130
  // Remove a state
128
131
  state.remove("test")
132
+
133
+ // Remove all states
134
+ state.removeAll()
135
+
136
+ *["test" is only an example]
137
+
129
138
  ```
130
139
 
131
140
  ### Observer 😎 for States
package/SUMMARY.md CHANGED
@@ -1,22 +1,22 @@
1
- # Table of contents
2
-
3
- * [dpHelper](README.md)
4
-
5
- ## General
6
-
7
- * [Store](/documents/STORE.md)
8
- * [State](/documents/STATE.md)
9
- * [Observer](/documents/OBSERVER.md)
10
- * [All Functions](/documents/TOOLS.md)
11
-
12
- ## documents
13
-
14
- * [License](LICENSE.md)
15
- * [Contributing](CONTRIBUTING.md)
16
- * [Code of Conduct](CODE_OF_CONDUCT.md)
17
- * [Security](SECURITY.md)
18
-
19
- ## changes
20
-
21
- * [Changelog](CAHNGELOG.md)
22
- * [History](HISTORY.md)
1
+ # Table of contents
2
+
3
+ * [dpHelper](README.md)
4
+
5
+ ## General
6
+
7
+ * [State](/documents/STATE.md)
8
+ * [Observer](/documents/OBSERVER.md)
9
+ * [Store](/documents/STORE.md)
10
+ * [All Functions](/documents/TOOLS.md)
11
+
12
+ ## documents
13
+
14
+ * [License](LICENSE.md)
15
+ * [Contributing](CONTRIBUTING.md)
16
+ * [Code of Conduct](CODE_OF_CONDUCT.md)
17
+ * [Security](SECURITY.md)
18
+
19
+ ## changes
20
+
21
+ * [Changelog](CAHNGELOG.md)
22
+ * [History](HISTORY.md)
package/docs/index.md CHANGED
@@ -116,16 +116,25 @@ You can use the browser's devtools console and type " **state.test = 'I am ready
116
116
 
117
117
  ```javascript
118
118
  // Set a state
119
- state.test = "I am ready";
119
+ state.test = "I am ready" *
120
120
 
121
121
  // Get the state
122
- state.test
122
+ state.test *
123
123
 
124
124
  // List all states
125
125
  state.list // or just "state" to see the proxy
126
126
 
127
+ // Lock a state from edit (Only for Objects or Array)
128
+ state.test.lock() *
129
+
127
130
  // Remove a state
128
131
  state.remove("test")
132
+
133
+ // Remove all states
134
+ state.removeAll()
135
+
136
+ *["test" is only an example]
137
+
129
138
  ```
130
139
 
131
140
  ### Observer 😎 for States
@@ -3,10 +3,6 @@
3
3
  ## Overview
4
4
  This document provides a comprehensive list of all available state functions in the `dphelper` library along with their descriptions and examples.
5
5
 
6
- ### News :)
7
- Now if you try to override the root state you get a message error!
8
- Also, now you can lock a state using example: __state.[stateName].lock()__
9
-
10
6
  ## Functions
11
7
 
12
8
  ### state.[state.name] ex: _state.test_
@@ -39,7 +35,7 @@ Also, now you can lock a state using example: __state.[stateName].lock()__
39
35
  ### state.name.lock()
40
36
 
41
37
  >>> New option!
42
- - **Description:** Lock a state.
38
+ - **Description:** Lock a state (only for types: Array, Object).
43
39
  - **Example:**
44
40
  ```javascript
45
41
  state.name = {test:"test"}
@@ -47,5 +43,17 @@ Also, now you can lock a state using example: __state.[stateName].lock()__
47
43
  "Now you can't add more data or remove it"
48
44
  ```
49
45
 
46
+ ### state.removeAll()
47
+
48
+ >>> New option!
49
+ - **Description:** Remove all states.
50
+ - **Example:**
51
+ ```javascript
52
+ state.name = {test:"test"}
53
+ state.removeAll();
54
+ "Now you can't see state.name (all states are removed)"
55
+ "Use for Log-out / Sign-out operation"
56
+ ```
57
+
50
58
  ## License
51
59
  This project is licensed under the MIT License.