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

Function parse

jsonc/parse.ts:24–31  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

22 * @returns The parsed JsonValue from the JSONC string.
23 */
24export function parse(text: string): JsonValue {
25 if (new.target) {
26 throw new TypeError(
27 "Cannot create an instance: parse is not a constructor",
28 );
29 }
30 return new JsoncParser(text).parse();
31}
32
33type TokenType =
34 | "BeginObject"

Callers 6

assertValidParseFunction · 0.90
assertInvalidParseFunction · 0.90
fnFunction · 0.90
parse_test.tsFile · 0.90
transformMethod · 0.90

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected