Skip to content

Commit

Permalink
doc: fix actual result of example is different in stream
Browse files Browse the repository at this point in the history
Error message of JSON.parse may be changed with current node version.
For reference, actual result is same with previous node
version(v16.18.1).
  • Loading branch information
deokjinkim committed Nov 29, 2022
1 parent fec0fbc commit 566c5ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Expand Up @@ -172,7 +172,7 @@ server.listen(1337);
// $ curl localhost:1337 -d "\"foo\""
// string
// $ curl localhost:1337 -d "not json"
// error: Unexpected token o in JSON at position 1
// error: Unexpected token 'o', "not json" is not valid JSON
```

[`Writable`][] streams (such as `res` in the example) expose methods such as
Expand Down

0 comments on commit 566c5ee

Please sign in to comment.