(chunks: string[])
| 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])) { |
| 190 | exts.push(chunks.shift()) |
| 191 | } |
| 192 | if (exts.length) { |
| 193 | return exts.join(SEPARATOR) |
| 194 | } |
| 195 | return '' |
| 196 | } |
| 197 | function parseExtensions(chunks: string[]): Omit<UnicodeLocaleId, 'lang'> { |
| 198 | if (!chunks.length) { |
| 199 | return {extensions: []} |