LendAndRegret/node_modules/es-toolkit/dist/_internal/compareValues.mjs
2026-05-02 17:27:43 +08:00

12 lines
209 B
JavaScript

function compareValues(a, b, order) {
if (a < b) {
return order === 'asc' ? -1 : 1;
}
if (a > b) {
return order === 'asc' ? 1 : -1;
}
return 0;
}
export { compareValues };