source:
node_modules/es-toolkit/dist/_internal/compareValues.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 209 bytes | |
| Line | |
|---|---|
| 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.
