INTEFACE MEDEC

interface ArrayConstructor {
    sortAlphaNumeric: (data: Array<any>) => Array<any>;
};

Array.sortAlphaNumeric = function (data): Array<any> {
    return data.sort((a, b) => {
        return a.AreaName.toLowerCase().localeCompare(b.AreaName.toLowerCase(), undefined, {
            numeric: true,
            sensitivity: 'base'
        });
    });
}
loonix