(raw, source)
| 211 | } |
| 212 | |
| 213 | function normalizeDirection(raw, source) { |
| 214 | if (raw === undefined) return undefined; |
| 215 | if (raw === "higher_is_worse" || raw === "lower_is_worse") return raw; |
| 216 | throw new Error(`${source} must be "higher_is_worse" or "lower_is_worse"`); |
| 217 | } |
| 218 | |
| 219 | function normalizeNumber(raw, source) { |
| 220 | const n = Number(raw); |
no outgoing calls
no test coverage detected