The readable.readableFlowing property in a readable stream that utilized to check if the streams are in flowing mode or not.
Syntax:
readable.readableFlowing
Return Value: It returns true if stream is in flowing mode else it returns false.
Below examples illustrate the use of readable.readableFlowing property in Node.js:
Example 1:
// Node.js program to demonstrate the // readable.readableFlowing Property // Include fs module var fs = require("fs"); var data = ''; // Create a readable stream var readerStream = fs.createReadStream('input.txt'); // Handling data event readerStream.on('data', function(chunk) { data += chunk; }); // Calling readableFlowing property readerStream.readableFlowing; |
Output:
true
Example 2:
// Node.js program to demonstrate the // readable.readableFlowing Property // Include fs module const fs = require("fs"); // Constructing readable stream const readable = fs.createReadStream("input.txt"); // Instructions for reading data readable.on('readable', () => { let chunk; // Using while loop and calling // read method with parameter while (null !== (chunk = readable.read())) { // Displaying the chunk console.log(`read: ${chunk}`); } }); // Calling readable.readableFlowing // Property readable.readableFlowing; |
Output:
false
Reference: https://nodejs.org/api/stream.html#stream_readable_readableflowing.
Recommended Posts:
- Nodejs | Automatic restart NodeJs server with nodemon
- Nodejs - Connect MongoDB with Node app using MongooseJS
- Cowsay in Nodejs using Requests library
- Nodejs | Web Crawling using Cheerio
- Web-Socket in NodeJS
- Signup Form Using Nodejs and MongoDB
- Dockerizing a simple Nodejs app
- Nodejs | DNS
- Encrypting Data in NodeJS
- Difference between NodeJS and AngularJS
- Nodejs | Jimp
- Nodejs – Connect Mysql with Node app
- Nodejs | DNS | setServers()
- NodeJS | Building simple REST API in express
- NodeJs - Handling invalid routes
- Nodejs | authentication using Passportjs and passport-local-mongoose
- Nodejs | GM charcoal() Function
- Nodejs | GM blur() Function
- Nodejs | GM sharpen() Function
- Nodejs | GM drawLine() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

