(id: string, name: string)
| 54 | } |
| 55 | |
| 56 | export function attrPath(id: string, name: string): string { |
| 57 | // RFC 6902 JSON Pointer: ~ → ~0, / → ~1 |
| 58 | const escapedName = name.replace(/~/g, "~0").replace(/\//g, "~1"); |
| 59 | return `/elements/${escapeIdForPath(id)}/attributes/${escapedName}`; |
| 60 | } |
| 61 | |
| 62 | export function timingPath(id: string, field: "start" | "end" | "duration" | "trackIndex"): string { |
| 63 | return `/elements/${escapeIdForPath(id)}/timing/${field}`; |
no test coverage detected