(a, b)
| 205 | * @returns {-1 | 0 | 1} compare result |
| 206 | */ |
| 207 | const compareNumbers = (a, b) => { |
| 208 | if (typeof a !== typeof b) { |
| 209 | return typeof a < typeof b ? -1 : 1; |
| 210 | } |
| 211 | if (a < b) return -1; |
| 212 | if (a > b) return 1; |
| 213 | return 0; |
| 214 | }; |
| 215 | |
| 216 | /** |
| 217 | * Compares strings numeric. |
no outgoing calls
no test coverage detected