| 172 | throw new RangeError('Malformed transformed_extension') |
| 173 | } |
| 174 | function parsePuExtension(chunks: string[]): PuExtension { |
| 175 | const exts = [] |
| 176 | while (chunks.length && ALPHANUM_1_8.test(chunks[0])) { |
| 177 | exts.push(chunks.shift()) |
| 178 | } |
| 179 | if (exts.length) { |
| 180 | return { |
| 181 | type: 'x', |
| 182 | value: exts.join(SEPARATOR), |
| 183 | } |
| 184 | } |
| 185 | throw new RangeError('Malformed private_use_extension') |
| 186 | } |
| 187 | function parseOtherExtensionValue(chunks: string[]): string { |
| 188 | const exts = [] |
| 189 | while (chunks.length && ALPHANUM_2_8.test(chunks[0])) { |