doc: fix code nits in common/README

1. Sync comments and code
2. Fix typos

PR-URL: https://github.com/nodejs/node/pull/17971
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Vse Mozhet Byt authored and Myles Borins committed 2018-01-10 01:42:25 -05:00
1 parent aa7519095c
commit 3bcdb3b996
1 file changed
+2 -3
+2 -3
View File
@@ -616,7 +616,7 @@ frame.
// padlen is an 8-bit integer giving the number of padding bytes to include
// final is a boolean indicating whether the End-of-stream flag should be set,
// defaults to false.
const data = new http2.DataFrame(id, payload, padlen, final);
const frame = new http2.DataFrame(id, payload, padlen, final);
socket.write(frame.data);
```
@@ -637,8 +637,7 @@ The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a
// padlen is an 8-bit integer giving the number of padding bytes to include
// final is a boolean indicating whether the End-of-stream flag should be set,
// defaults to false.
const data = new http2.HeadersFrame(id, http2.kFakeRequestHeaders,
padlen, final);
const frame = new http2.HeadersFrame(id, payload, padlen, final);
socket.write(frame.data);
```