MCPcopy Index your code
hub / github.com/formatjs/formatjs / parsePuExtension

Function parsePuExtension

packages/intl-getcanonicallocales/parser.ts:174–186  ·  view source on GitHub ↗
(chunks: string[])

Source from the content-addressed store, hash-verified

172 throw new RangeError('Malformed transformed_extension')
173}
174function 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}
187function parseOtherExtensionValue(chunks: string[]): string {
188 const exts = []
189 while (chunks.length && ALPHANUM_2_8.test(chunks[0])) {

Callers 1

parseExtensionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected