(x, y)
| 29 | * 1 if a greater than b |
| 30 | */ |
| 31 | const defaultComparator = function (x, y) { |
| 32 | if (x === undefined && y === undefined) return 0 |
| 33 | if (x === undefined) return 1 |
| 34 | if (y === undefined) return -1 |
| 35 | const xString = toString(x) |
| 36 | const yString = toString(y) |
| 37 | if (xString < yString) return -1 |
| 38 | if (xString > yString) return 1 |
| 39 | return 0 |
| 40 | } |
| 41 | /** |
| 42 | * @function helper function for defaultComparator |
| 43 | * Converts a given object to String |
nothing calls this directly
no test coverage detected