@neovici/cosmoz-utils 5.36.0 → 5.37.1

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/money.js CHANGED
@@ -4,11 +4,18 @@ const CURRENCY_FORMATTERS = {}, NUMBER_FORMATTERS = {}, _getCurrencyFormatter =
4
4
  }
5
5
  const key = currency.toUpperCase() + (locale || '');
6
6
  if (CURRENCY_FORMATTERS[key] == null) {
7
- CURRENCY_FORMATTERS[key] = new Intl.NumberFormat(locale, {
8
- style: 'currency',
9
- currency,
10
- currencyDisplay,
11
- });
7
+ try {
8
+ CURRENCY_FORMATTERS[key] = new Intl.NumberFormat(locale, {
9
+ style: 'currency',
10
+ currency,
11
+ currencyDisplay,
12
+ });
13
+ }
14
+ catch (e) {
15
+ // eslint-disable-next-line no-console
16
+ console.error('Invalid format', e);
17
+ return;
18
+ }
12
19
  }
13
20
  return CURRENCY_FORMATTERS[key];
14
21
  },
package/dist/promise.d.ts CHANGED
@@ -7,5 +7,5 @@ export declare const timeout$: (ms?: number) => Promise<unknown>;
7
7
  type Predicate<T extends Event> = (e: T) => boolean;
8
8
  export declare const event$: <E extends Event, P extends Predicate<E>>(target: EventTarget, type: string, predicate?: P | undefined, timeout?: number) => Promise<unknown>;
9
9
  export declare const limit$: <T extends unknown[], P>(fn: (...args: T) => PromiseLike<P>, limit: number) => (...args: T) => Promise<P>;
10
- export declare const debounce$: <T extends unknown[], P>(fn: (...args: T) => PromiseLike<P>, ms?: number) => (...args: T) => Promise<P>;
10
+ export declare const debounce$: <T extends unknown[], P>(fn: (...args: T) => P | PromiseLike<P>, ms?: number) => (...args: T) => Promise<P>;
11
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-utils",
3
- "version": "5.36.0",
3
+ "version": "5.37.1",
4
4
  "description": "Date, money and template management functions commonly needed in Cosmoz views.",
5
5
  "keywords": [
6
6
  "polymer",