Function
isLengthValid
(
value: any,
length: number,
validatorFn: (value: string, length: number) => boolean
)
Source from the content-addressed store, hash-verified
| 16 | } |
| 17 | |
| 18 | export function isLengthValid( |
| 19 | value: any, |
| 20 | length: number, |
| 21 | validatorFn: (value: string, length: number) => boolean |
| 22 | ): boolean { |
| 23 | // Don't try to validate non string values |
| 24 | return typeof value === 'string' ? validatorFn(value, length) : true; |
| 25 | } |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…