source:
node_modules/es-toolkit/dist/_internal/compareValues.mjs@
a762898
| Last change on this file since a762898 was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 209 bytes | |
| Rev | Line | |
|---|---|---|
| [a762898] | 1 | function compareValues(a, b, order) { |
| 2 | if (a < b) { | |
| 3 | return order === 'asc' ? -1 : 1; | |
| 4 | } | |
| 5 | if (a > b) { | |
| 6 | return order === 'asc' ? 1 : -1; | |
| 7 | } | |
| 8 | return 0; | |
| 9 | } | |
| 10 | ||
| 11 | export { compareValues }; |
Note:
See TracBrowser
for help on using the repository browser.
