@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/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -1
- package/src/utility/dom.js +11 -0
- package/src/utility/number.js +3 -2
package/package.json
CHANGED
package/src/utility/dom.js
CHANGED
@@ -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() ) {
|
package/src/utility/number.js
CHANGED
@@ -101,8 +101,9 @@ export class Num
|
|
101
101
|
value = Any.float(num).toFixed(fixed);
|
102
102
|
}
|
103
103
|
|
104
|
-
let totals =
|
105
|
-
|
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
|
|