@smartico/public-api 0.0.134 → 0.0.136

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.
@@ -153,7 +153,7 @@ IntUtils.JsonOrText = str => {
153
153
  };
154
154
  IntUtils.isWithinPeriod = (timestamp, period) => {
155
155
  const now = new Date();
156
- const completedDate = new Date(timestamp * 1000);
156
+ const completedDate = new Date(timestamp);
157
157
  switch (period) {
158
158
  case 'today':
159
159
  return now.getFullYear() === completedDate.getFullYear() && now.getMonth() === completedDate.getMonth() && now.getDate() === completedDate.getDate();
@@ -488,7 +488,33 @@ var ActivityTypeLimited;
488
488
  ActivityTypeLimited[ActivityTypeLimited["UnTagCustomer"] = 505] = "UnTagCustomer";
489
489
  })(ActivityTypeLimited || (ActivityTypeLimited = {}));
490
490
 
491
- class CoreUtils {}
491
+ class CoreUtils {
492
+ static currencySymbol(currency) {
493
+ return {
494
+ [currency.toUpperCase()]: currency.toUpperCase(),
495
+ USD: "$",
496
+ EUR: "€",
497
+ JPY: "¥",
498
+ GBP: "£",
499
+ AUD: "A$",
500
+ CAD: "C$",
501
+ CHF: "CHF",
502
+ CNY: "¥",
503
+ SEK: "kr",
504
+ NZD: "NZ$",
505
+ MXN: "MX$",
506
+ SGD: "S$",
507
+ HKD: "HK$",
508
+ NOK: "kr",
509
+ KRW: "₩",
510
+ TRY: "₺",
511
+ INR: "₹",
512
+ RUB: "₽",
513
+ BRL: "R$",
514
+ ZAR: "R" // South African Rand
515
+ }[currency.toUpperCase()];
516
+ }
517
+ }
492
518
  CoreUtils.avatarUrl = (avatar_id, avatarDomain) => {
493
519
  if (avatarDomain && avatar_id !== null && avatar_id !== undefined && !(avatar_id.startsWith && avatar_id.startsWith('http'))) {
494
520
  if (avatarDomain.endsWith('/')) {