@signal24/vue-foundation 4.13.2 → 4.13.4

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.
@@ -11,7 +11,7 @@ declare function upperCase(value: null): null;
11
11
  declare function upperCase(value: string): string;
12
12
  declare function desnake(value: null): null;
13
13
  declare function desnake(value: string): string;
14
- declare function usCurrency(value: string | number): string;
14
+ declare function usCurrency(value: string | number, divisor?: number): string;
15
15
  declare const FilterFns: {
16
16
  bytes: typeof bytes;
17
17
  dash: typeof dash;
@@ -2,5 +2,5 @@ export { escapeHtml } from '@vue/shared';
2
2
  export declare function nl2br(value: string): string;
3
3
  export declare function desnakeCase(value: string): string;
4
4
  export declare function formatPhone(value: string): string;
5
- export declare function formatUSCurrency(value: string | number): string;
5
+ export declare function formatUSCurrency(value: string | number, divisor?: number): string;
6
6
  export declare function uuid(): string;
@@ -460,8 +460,8 @@ function xt(e) {
460
460
  const t = e.replace(/\D/g, "").replace(/^1/, "");
461
461
  return t.length != 10 ? e : "(" + t.substring(0, 3) + ") " + t.substring(3, 6) + "-" + t.substring(6);
462
462
  }
463
- function Lt(e) {
464
- return "$" + Number(e).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
463
+ function Lt(e, t = 1) {
464
+ return "$" + (Number(e) / t).toFixed(3).replace(/0$/, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
465
465
  }
466
466
  function Kn() {
467
467
  return St();
@@ -899,8 +899,8 @@ function Qt(e) {
899
899
  function Jt(e) {
900
900
  return e ? Ct(e) : null;
901
901
  }
902
- function en(e) {
903
- return Lt(e);
902
+ function en(e, t = 1) {
903
+ return Lt(e, t);
904
904
  }
905
905
  const fe = {
906
906
  bytes: Pt,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.13.2",
4
+ "version": "4.13.4",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -53,8 +53,8 @@ function desnake(value: string | null) {
53
53
  return value ? desnakeCase(value) : null;
54
54
  }
55
55
 
56
- function usCurrency(value: string | number) {
57
- return formatUSCurrency(value);
56
+ function usCurrency(value: string | number, divisor = 1) {
57
+ return formatUSCurrency(value, divisor);
58
58
  }
59
59
 
60
60
  const FilterFns = {
@@ -18,10 +18,10 @@ export function formatPhone(value: string) {
18
18
  return '(' + cleanValue.substring(0, 3) + ') ' + cleanValue.substring(3, 6) + '-' + cleanValue.substring(6);
19
19
  }
20
20
 
21
- export function formatUSCurrency(value: string | number) {
21
+ export function formatUSCurrency(value: string | number, divisor = 1) {
22
22
  return (
23
23
  '$' +
24
- Number(value)
24
+ (Number(value) / divisor)
25
25
  .toFixed(3)
26
26
  .replace(/0$/, '')
27
27
  .replace(/\B(?=(\d{3})+(?!\d))/g, ',')