Skip to content

Commit

Permalink
doc: edit stream module introduction
Browse files Browse the repository at this point in the history
Edit the stream module introduction for concision and simplicity.

PR-URL: #28595
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
Trott authored and targos committed Jul 20, 2019
1 parent ccb54f7 commit 0380a55
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
> Stability: 2 - Stable
A stream is an abstract interface for working with streaming data in Node.js.
The `stream` module provides a base API that makes it easy to build objects
that implement the stream interface.
The `stream` module provides an API for implementing the stream interface.

There are many stream objects provided by Node.js. For instance, a
[request to an HTTP server][http-incoming-message] and [`process.stdout`][]
Expand All @@ -15,16 +14,14 @@ are both stream instances.
Streams can be readable, writable, or both. All streams are instances of
[`EventEmitter`][].

The `stream` module can be accessed using:
To access the `stream` module:

```js
const stream = require('stream');
```

While it is important to understand how streams work, the `stream` module itself
is most useful for developers that are creating new types of stream instances.
Developers who are primarily *consuming* stream objects will rarely need to use
the `stream` module directly.
The `stream` module is useful for creating new types of stream instances. It is
usually not necessary to use the `stream` module to consume streams.

## Organization of this Document

Expand Down

0 comments on commit 0380a55

Please sign in to comment.