(label: string, value: string)
| 8 | const separator = "\u0000" |
| 9 | |
| 10 | function fragment(label: string, value: string) { |
| 11 | if (value.includes(separator)) throw new Error(`${label} cannot contain null bytes`) |
| 12 | return value |
| 13 | } |
| 14 | |
| 15 | function compose(scope: ServerScope, parts: string[]) { |
| 16 | return [fragment("Server scope", scope), ...parts.map((part) => fragment("Scoped key part", part))].join(separator) |
no outgoing calls
no test coverage detected