From 99e3b32d43cb671f222618ffda218ad20e53f528 Mon Sep 17 00:00:00 2001 From: ottomated <31470743+ottomated@users.noreply.github.com> Date: Thu, 24 Oct 2024 06:49:44 -0700 Subject: [PATCH] docs(napi): Remove JSON.parse from example (#6836) Co-authored-by: overlookmotel --- npm/oxc-parser/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/npm/oxc-parser/README.md b/npm/oxc-parser/README.md index 06b85a4ceb3cb..d186f98d1ca82 100644 --- a/npm/oxc-parser/README.md +++ b/npm/oxc-parser/README.md @@ -15,8 +15,7 @@ test(oxc.parseSync(sourceText, options)); test(await oxc.parseAsync(sourceText, options)); function test(ret) { - const program = JSON.parse(ret.program); - assert(program.body.length == 1); + assert(ret.program.body.length == 1); assert(ret.errors.length == 0); } ```