📅  最后修改于: 2022-03-11 15:04:08.428000             🧑  作者: Mango
// Preserve original property order
originalOrder = (a: KeyValue, b: KeyValue): number => {
return 0;
}
// Order by ascending property value
valueAscOrder = (a: KeyValue, b: KeyValue): number => {
return a.value.localeCompare(b.value);
}
// Order by descending property key
keyDescOrder = (a: KeyValue, b: KeyValue): number => {
return a.key > b.key ? -1 : (b.key > a.key ? 1 : 0);
}