@argent/x-shared 1.48.0 → 1.48.2

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../utils/number/prettifyNumber.cjs"),o=require("../utils/number/isNumeric.cjs"),n=(e,t="$",r)=>{if(e===void 0||!o.isNumeric(e))return null;const i=u.prettifyCurrencyNumber(e,r);return[t,i].filter(Boolean).join("")};exports.prettifyCurrencyValue=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../utils/number/prettifyNumber.cjs"),l=require("../utils/number/isNumeric.cjs"),s=(t,e="$",r)=>{if(t===void 0||!l.isNumeric(t))return null;const i=Number(t)<0,o=t.toString().replace("-",""),u=n.prettifyCurrencyNumber(o,r);return[i?"-":"",e,u].filter(Boolean).join("")};exports.prettifyCurrencyValue=s;
@@ -1,11 +1,15 @@
1
- import { prettifyCurrencyNumber as i } from "../utils/number/prettifyNumber.js";
2
- import { isNumeric as l } from "../utils/number/isNumeric.js";
3
- const u = (t, r = "$", e) => {
4
- if (t === void 0 || !l(t))
1
+ import { prettifyCurrencyNumber as n } from "../utils/number/prettifyNumber.js";
2
+ import { isNumeric as m } from "../utils/number/isNumeric.js";
3
+ const a = (t, e = "$", o) => {
4
+ if (t === void 0 || !m(t))
5
5
  return null;
6
- const o = i(t, e);
7
- return [r, o].filter(Boolean).join("");
6
+ const r = Number(t) < 0, i = t.toString().replace("-", ""), l = n(i, o);
7
+ return [
8
+ r ? "-" : "",
9
+ e,
10
+ l
11
+ ].filter(Boolean).join("");
8
12
  };
9
13
  export {
10
- u as prettifyCurrencyValue
14
+ a as prettifyCurrencyValue
11
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.48.0",
3
+ "version": "1.48.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"