@wikicasa-dev/utilities 0.0.5 → 0.0.6

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/main.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export declare function ciao(): void;
2
+ export { formatInteger, formatFloat } from "./NumberUtils";
package/dist/utilities.js CHANGED
@@ -1,6 +1,24 @@
1
- function o() {
1
+ function o(t, n = !1) {
2
+ return t == null ? "" : r(n ? Math.round(t) : Math.floor(t), 0);
3
+ }
4
+ function r(t, n) {
5
+ return !t && t !== 0 ? "" : t.toLocaleString(
6
+ "it-IT",
7
+ // usare una stringa tipo 'en-US' per sovrascrivere la lingua del browser
8
+ {
9
+ minimumFractionDigits: n,
10
+ maximumFractionDigits: n
11
+ }
12
+ );
13
+ }
14
+ function i(t, n = 2) {
15
+ return r(t, n);
16
+ }
17
+ function f() {
2
18
  console.log("CIAO");
3
19
  }
4
20
  export {
5
- o as ciao
21
+ f as ciao,
22
+ i as formatFloat,
23
+ o as formatInteger
6
24
  };
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(e=typeof globalThis<"u"?globalThis:e||self,i(e.utilities={}))})(this,function(e){"use strict";function i(){console.log("CIAO")}e.ciao=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.utilities={}))})(this,function(n){"use strict";function i(t,e=!1){return t==null?"":o(e?Math.round(t):Math.floor(t),0)}function o(t,e){return!t&&t!==0?"":t.toLocaleString("it-IT",{minimumFractionDigits:e,maximumFractionDigits:e})}function f(t,e=2){return o(t,e)}function r(){console.log("CIAO")}n.ciao=r,n.formatFloat=f,n.formatInteger=i,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/utilities",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Wikicasa frontend utilities",
5
5
  "type": "module",
6
6
  "main": "./dist/utilities.umd.cjs",