yet-another-js-utils 0.0.11 → 1.1.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/README.md CHANGED
@@ -11,14 +11,15 @@ npm install yet-another-js-utils
11
11
  ```js
12
12
  const yaju = require('yet-another-js-utils');
13
13
  // (...)
14
- yaju.diffVDomAndUpdate(newRender, previousRender, dom);
14
+ yaju.diffVDomAndUpdate(previousRender, newRender, dom);
15
15
  this.previousRender = newRender;
16
- applyState(dom);
16
+ yaju.resetDataState(dom);
17
+ yaju.addDataState(dom, 'updated');
17
18
  ```
18
19
 
19
20
  ## Dependencies
20
21
 
21
- 0
22
+ None.
22
23
 
23
24
  ## License
24
25
 
package/js-utils.js CHANGED
@@ -225,6 +225,14 @@ module.exports = {
225
225
  }
226
226
  },
227
227
 
228
+ /**
229
+ * Reset
230
+ * @param { object } element
231
+ */
232
+ resetDataState(element) {
233
+ element.dataset.state = '';
234
+ }
235
+
228
236
  //# AJAX Functions
229
237
 
230
238
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "yet-another-js-utils",
3
3
  "description": "Basic javascript utils",
4
4
  "authors": "Adrian Turcev",
5
- "version": "0.0.11",
5
+ "version": "1.1.0",
6
6
  "license": "MPL-2.0",
7
7
  "homepage": "https://github.com/adrianturcev/js-utils",
8
8
  "repository": {