Function
getLengthOrSize
(value: ValueWithLengthOrSize)
Source from the content-addressed store, hash-verified
| 34 | |
| 35 | /** Gets the length or size of the given value. */ |
| 36 | export function getLengthOrSize(value: ValueWithLengthOrSize) { |
| 37 | const v = value as {length: number; size: number}; |
| 38 | return typeof v.length === 'number' ? v.length : v.size; |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Gets the value for an option that may be either a static value or a logic function that produces |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…