@neovici/cosmoz-utils 5.30.0 → 5.32.0

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/array.d.ts CHANGED
@@ -5,3 +5,4 @@ export declare function array<T>(arr: Iterable<T>): T[];
5
5
  export declare function array<T = unknown>(arr: T): T[];
6
6
  export declare const without: <E, L = E>(exclude: E | E[], predicate?: <T extends E | L>(value: T) => unknown) => <T_1 extends L = L>(list: T_1 | T_1[]) => T_1[];
7
7
  export declare const chunk: <T>(list: T[], size: number) => T[][];
8
+ export declare const intersect: <T>(list: T[][]) => T[];
package/dist/array.js CHANGED
@@ -22,3 +22,7 @@ export const without = (exclude, predicate = identity) => (list) => {
22
22
  return array(list).filter((value) => !excludes.includes(predicate(value)));
23
23
  };
24
24
  export const chunk = (list, size) => [...Array(Math.ceil(list.length / size)).keys()].map((i) => list.slice(i * size, (i + 1) * size));
25
+ export const intersect = (list) => {
26
+ const [first = [], ...rest] = list.sort();
27
+ return first.filter((e) => rest.every((arr) => arr.includes(e)));
28
+ };
package/dist/date.js CHANGED
@@ -78,6 +78,7 @@ isoDT = (date) => {
78
78
  hour: 'numeric',
79
79
  minute: 'numeric',
80
80
  second: 'numeric',
81
+ hourCycle: 'h23'
81
82
  });
82
83
  },
83
84
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-utils",
3
- "version": "5.30.0",
3
+ "version": "5.32.0",
4
4
  "description": "Date, money and template management functions commonly needed in Cosmoz views.",
5
5
  "keywords": [
6
6
  "polymer",