(segment: string)
| 34 | }; |
| 35 | |
| 36 | const decodePointerSegment = (segment: string): PropertyKey => { |
| 37 | const decoded = segment.replaceAll("~1", "/").replaceAll("~0", "~"); |
| 38 | return /^\d+$/.test(decoded) ? Number(decoded) : decoded; |
| 39 | }; |
| 40 | |
| 41 | const pointerToPath = (pointer: string | undefined): ReadonlyArray<PropertyKey> | undefined => { |
| 42 | if (!pointer || pointer.length === 0 || pointer === "/") { |
nothing calls this directly
no outgoing calls
no test coverage detected