// This is a simple encapsulation class for the Collator used in sorting. export class Sort { private collator = new Intl.Collator('et', { numeric: true, sensitivity: 'base', }); constructor() { } public sort(value: Array, property: string, order: number, type = ''): Array { return value.sort((a, b) => this.collator.compare(a[property], b[property]) * order); } }