MCPcopy Create free account
hub / github.com/denoland/std / nan

Function nan

toml/_parser.ts:618–626  ·  view source on GitHub ↗
(scanner: Scanner)

Source from the content-addressed store, hash-verified

616
617const NAN_REGEXP = /[+-]?nan\b/y;
618export function nan(scanner: Scanner): ParseResult<number> {
619 scanner.skipWhitespaces();
620 const match = scanner.match(NAN_REGEXP);
621 if (!match) return failure();
622 const string = match[0];
623 scanner.next(string.length);
624 const value = NaN;
625 return success(value);
626}
627
628export const dottedKey = join1(or([bareKey, basicString, literalString]), ".");
629

Callers

nothing calls this directly

Calls 5

failureFunction · 0.85
successFunction · 0.85
matchMethod · 0.80
skipWhitespacesMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected