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

Method peek

packages/icu-messageformat-parser/parser.ts:1254–1262  ·  view source on GitHub ↗

* Peek at the *next* Unicode codepoint in the input without advancing the parser. * If the input has been exhausted, then this returns null.

()

Source from the content-addressed store, hash-verified

1252 * If the input has been exhausted, then this returns null.
1253 */
1254 private peek(): number | null {
1255 if (this.isEOF()) {
1256 return null
1257 }
1258 const code = this.char()
1259 const offset = this.offset()
1260 const nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1))
1261 return nextCode ?? null
1262 }
1263}
1264
1265/**

Callers 3

parseMessageMethod · 0.95
tryParseQuoteMethod · 0.95

Calls 3

isEOFMethod · 0.95
charMethod · 0.95
offsetMethod · 0.95

Tested by

no test coverage detected