(left, right)
| 242 | } |
| 243 | |
| 244 | function compareValues(left, right) { |
| 245 | const leftComparable = toComparableValue(left); |
| 246 | const rightComparable = toComparableValue(right); |
| 247 | |
| 248 | if (leftComparable < rightComparable) { |
| 249 | return -1; |
| 250 | } |
| 251 | if (leftComparable > rightComparable) { |
| 252 | return 1; |
| 253 | } |
| 254 | return 0; |
| 255 | } |
| 256 | |
| 257 | function normalizeRole(role) { |
| 258 | return role === 'admin' ? 'admin' : 'user'; |
no test coverage detected