@kizmann/pico-js 1.0.6 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/pico-js",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -903,6 +903,17 @@ export class Dom
903
903
  return this;
904
904
  }
905
905
 
906
+ stateClass(vals, state = true)
907
+ {
908
+ if ( this.length() > 1 ) {
909
+ return this.each((el) => Dom.find(el).stateClass(vals, state));
910
+ }
911
+
912
+ state ? this.addClass(vals) : this.removeClass(vals);
913
+
914
+ return this;
915
+ }
916
+
906
917
  attr(attr, val = undefined)
907
918
  {
908
919
  if ( this.empty() ) {
@@ -101,8 +101,9 @@ export class Num
101
101
  value = Any.float(num).toFixed(fixed);
102
102
  }
103
103
 
104
- let totals = value.replace(/\.[0-9]+$/, ''),
105
- minals = value.replace(/^[0-9\-]+\./, '');
104
+ let [totals, minals] = [
105
+ value.replace(/\.[0-9]+$/, ''), value.replace(/^[0-9\-]+\./, '')
106
+ ];
106
107
 
107
108
  let splits = Arr.reduce(totals.split('').reverse(), (result, val, key) => {
108
109