Function
parseLengthParams
(
customParams: LengthArgs,
errorMessage: string
)
Source from the content-addressed store, hash-verified
| 3 | } |
| 4 | |
| 5 | export function parseLengthParams( |
| 6 | customParams: LengthArgs, |
| 7 | errorMessage: string |
| 8 | ) { |
| 9 | const length = |
| 10 | customParams.length === null ? NaN : Number(customParams.length); |
| 11 | if (isNaN(length)) { |
| 12 | throw new Error(errorMessage); |
| 13 | } |
| 14 | |
| 15 | return length; |
| 16 | } |
| 17 | |
| 18 | export function isLengthValid( |
| 19 | value: any, |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…