Skip to content

Commit 47a5898

Browse files
committed
Update index.md
1 parent 09cdcc1 commit 47a5898

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Each type of Stream is an EventEmitter instance and throws several events at dif
232232
* **error** − This event is fired when there is any error receiving or writing data.
233233
* **finish** − This event is fired when all the data has been flushed to underlying system.
234234

235-
**Reading from a Stream:**
235+
**1. Reading from a Stream:**
236236

237237
```js
238238
const fs = require("fs");
@@ -260,7 +260,7 @@ readerStream.on('error', function(err) {
260260
console.log("Program Ended");
261261
```
262262

263-
**Writing to a Stream:**
263+
**2. Writing to a Stream:**
264264

265265
```js
266266
const fs = require("fs");
@@ -287,7 +287,7 @@ writerStream.on('error', function(err) {
287287
console.log("Program Ended");
288288
```
289289

290-
**Piping the Streams:**
290+
**3. Piping the Streams:**
291291

292292
Piping is a mechanism where we provide the output of one stream as the input to another stream. It is normally used to get data from one stream and to pass the output of that stream to another stream. There is no limit on piping operations.
293293

@@ -307,7 +307,7 @@ readerStream.pipe(writerStream);
307307
console.log("Program Ended");
308308
```
309309

310-
**Chaining the Streams:**
310+
**4. Chaining the Streams:**
311311

312312
Chaining is a mechanism to connect the output of one stream to another stream and create a chain of multiple stream operations. It is normally used with piping operations.
313313

0 commit comments

Comments
 (0)