API/readNumber
readNumber
src/utils/read-path.tsfunction
readNumber()
Section titled “readNumber()”readNumber(response: RawResponse, path: string): number | undefinedRead a path expected to hold a number.
Values that are not numbers resolve to undefined rather than being coerced,
so a malformed envelope surfaces as “absent” instead of NaN.
| Parameter | Type | Description |
|---|---|---|
response |
RawResponse |
The raw response body |
path |
string |
Dot-separated path |
Returns — The number at that path, or undefined
