Skip to content

Commit

Permalink
docs(napi): Remove JSON.parse from example (oxc-project#6836)
Browse files Browse the repository at this point in the history
Co-authored-by: overlookmotel <[email protected]>
  • Loading branch information
ottomated and overlookmotel authored Oct 24, 2024
1 parent 67a7bde commit 99e3b32
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions npm/oxc-parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
```

0 comments on commit 99e3b32

Please sign in to comment.