Daniel Bevenius
367065be4b
doc: make comment indentation consistent
...
Currently, some of the docs use different indentation for comments
in the code examples. This commit makes the indentation consistent
by putting the comments at the beginning of the line (really no
indentation that is).
PR-URL: https://github.com/nodejs/node/pull/9518
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2016-11-16 07:52:57 +01:00
Roman Reiss
8eb19c48fa
doc: consistent 'Returns:'
...
For consistency, changed all `Return:` to `Returns:` in the API docs.
PR-URL: https://github.com/nodejs/node/pull/9554
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-11-13 08:58:13 +01:00
Benji Marinacci
3c4349e8a2
doc: edit Stream api grammar
...
Sections:
- Introduction
- Orginization of this Document
- Object Mode
- Buffering
- API for Stream Implementers
PR-URL: https://github.com/nodejs/node/pull/9100
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-10-17 09:05:42 -07:00
Anna Henningsen
2a4b068aca
stream: proper instanceof for Writables
...
Use `[Symbol.hasInstance]()` to return `true` when asking for
`new Duplex() instanceof Writable`.
PR-URL: https://github.com/nodejs/node/pull/8834
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
2016-10-10 18:05:23 +02:00
Luigi Pinca
7f71419ee4
doc: fix example in stream doc
...
Fix cases where `chunk` is a buffer.
PR-URL: https://github.com/nodejs/node/pull/8378
Fixes: https://github.com/nodejs/node/issues/8085
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-09-24 23:12:51 +02:00
Mike Ralphson
3905f48882
doc: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/8370
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-09-02 23:49:54 +02:00
Hubert Mine
f7dd3bc19f
doc: fix typo in stream doc
...
PR-URL: https://github.com/nodejs/node/pull/8326
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-09-01 07:22:03 +02:00
Zwb
a72a331536
doc: fix onReadable reentry after unshift called
...
In example parseHeader, stream listen **readable** event,
if call stream.unshift(buf) before stream.removeListener('readable',
onReadable), readable event will be emited before removeListener,
so callback will not been called correctlly.
After change to
```js
stream.removeListener('error', callback);
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
```
It solves this problem.
PR-URL: https://github.com/nodejs/node/pull/8200
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-08-26 21:59:55 -07:00
lazlojuly
66d697cb5c
doc: fix variable scoping bug in server example code
...
Const is block scoped.
PR-URL: https://github.com/nodejs/node/pull/8124
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2016-08-18 09:50:27 -07:00
Anna Henningsen
c809b88345
doc: use blockquotes for Stability: markers
...
Use blockquotes instead of code blocks for stability markers in
the docs. Doing that:
- Makes the makers appear correctly when viewed e.g. on github.
- Allows remark-lint rules like `no-undefined-references` to work
properly (https://github.com/nodejs/node/pull/7729 ).
PR-URL: https://github.com/nodejs/node/pull/7757
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-08-04 22:43:34 +02:00
Alex Perkins
1d83013d19
doc: minor typo fixes in stream docs
...
PR-URL: https://github.com/nodejs/node/pull/7763
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-07-27 13:42:58 +02:00
Italo A. Casas
c897d0ba71
doc: add added: information for stream
...
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/7287
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
2016-07-17 23:20:46 +02:00
saadq
28d9485c25
doc: fix inconsistencies in code style
...
Adds missing semicolons, removes extra white space, and properly indents
various code snippets in the documentation.
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/7745
2016-07-15 13:51:58 -04:00
Kevin Donahue
c09dfe3a0b
doc: fix typo in stream doc
...
Fix small typo in Buffering section of stream doc.
PR-URL: https://github.com/nodejs/node/pull/7738
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-07-15 16:56:02 +02:00
Сковорода Никита Андреевич
a58b48bc3b
doc: various documentation formatting fixes
...
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>"
* Fix some markdown errors, e.g. in changelogs
* Fix broken defs links, e.g. in domain-postmortem.md
* Fix other broken refs, by addaleax
* Add links to some defs that were present but not linked to
* Remove dead defs
* Move defs to the bottom (one file affected)
* Add language indicators to all code blocks, using `txt` when no
specific language could be chosen
* Some minor formatting changes (spaces, ident, headings)
PR-URL: https://github.com/nodejs/node/pull/7637
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-07-14 12:26:50 +03:00
Italo A. Casas
79f961aa09
doc: fix link in the stream doc
...
fixing typo
fixing broken links
PR-URL: https://github.com/nodejs/node/pull/7347
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-06-23 22:14:03 +02:00
vsemozhetbyt
58a241d537
doc: fix typos in the stream doc
...
PR-URL: https://github.com/nodejs/node/pull/7336
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-06-21 18:57:43 +02:00
Jesús Leganés Combarro "piranna
0cd0118334
stream: 'data' argument on callback of Transform._flush()
...
Add a `data` argument on Transform._flush() callback to be API
consistent with Transform._transform().
Fixes: https://github.com/nodejs/node/issues/3707
PR-URL: https://github.com/nodejs/node/pull/3708
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2016-06-09 11:06:01 +02:00
Rich Trott
a78c2335b1
doc: use consistent typography in streams.md
...
In prose, always surround `null`-as-a-value in backticks.
PR-URL: https://github.com/nodejs/node/pull/6986
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com >
2016-06-06 17:06:58 -07:00
James M Snell
80ea0c5a64
doc: general improvements to stream.md copy
...
Majoring restructuring and update for streams doc.
This is the first step of multiple to updating and
correcting the streams documentation.
PR-URL: https://github.com/nodejs/node/pull/6947
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2016-06-06 08:17:19 -07:00
Robert Jefe Lindstaedt
9daf4a2937
doc: discourage use of util.inherits
...
util.inherits breaks the prototype chain. A fix does not seem
useful, since ES6 extends provides language level support for the
same functionality.
This commit starts fasing out mentions of the method.
Fixes: https://github.com/nodejs/node/issues/6512
Fixes: https://github.com/nodejs/node/issues/4179
PR-URL: https://github.com/nodejs/node/pull/6514
Reviewed-By: James Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-05-09 14:10:41 +02:00
Jenna Vuong
2aa376914b
doc: adds 'close' events to fs.ReadStream and fs.WriteStream
...
Add 'close' event to doc/api/fs.md --> fs.ReadStream
Add 'close' event to doc/api/fs.md --> fs.WriteStream
Add 'close event to doc/api/stream.md --> stream.Writable
From squashed history:
Add 'close' event to stream.Writable per Issue #6484
Add #### prefix to Event: 'close' and backticks to 'close'
similar to stream.Readable event: 'close' section
Add more specifics to 'close' events for fs.ReadStream
and fs.WriteStream
Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream'
wrapped long lines at 80 chars, reworded
per Issue #6484
including the 'close' event as optional
add 'close' event as optional in stream.Readable
per issue #6484
doc: Add 'close' events to fs.ReadStream, 80char nit
Fixes : #6484
PR-URL: https://github.com/nodejs/node/pull/6499
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com >
2016-05-03 20:35:50 +02:00
Alexander Makarenko
bcce05dba4
doc: make writable.setDefaultEncoding() return this
...
Let this function return `this` for parity with `readable.setEncoding()`.
PR-URL: https://github.com/nodejs/node/pull/5040
Fixes: https://github.com/nodejs/node/issues/5013
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-04-30 12:55:46 -04:00
Jackson Tian
e556dd3856
doc: use Buffer.from() instead of new Buffer()
...
Use new API of Buffer to developers in most documents.
PR-URL: https://github.com/nodejs/node/pull/6367
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2016-04-27 13:23:41 +08:00
Robert Jefe Lindstaedt
0800c0aa72
doc: git mv to .md
...
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md
PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-04-20 16:34:27 -07:00