Answers for "inteface method extension angular"

0

inteface method extension angular

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'
        });
    });
}
Posted by: Guest on September-04-2021

Code answers related to "inteface method extension angular"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language