(ref: string)
| 58 | } |
| 59 | |
| 60 | export function parseBlockRef(ref: string): number | null { |
| 61 | const normalized = ref.trim().toLowerCase() |
| 62 | const match = normalized.match(BLOCK_REF_REGEX) |
| 63 | if (!match) { |
| 64 | return null |
| 65 | } |
| 66 | const id = Number.parseInt(match[1], 10) |
| 67 | return Number.isInteger(id) ? id : null |
| 68 | } |
| 69 | |
| 70 | export function parseBoundaryId(id: string): ParsedBoundaryId | null { |
| 71 | const normalized = id.trim().toLowerCase() |
no outgoing calls
no test coverage detected