VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-stream-writable-writablecorked-property/

⇱ Node.js Stream writable.writableCorked Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js Stream writable.writableCorked Property

Last Updated : 12 Oct, 2021
The writable.writableCorked property is an inbuilt application programming interface of Stream module which is used to check the number of times you need to call the uncork() function so that you can fully uncork the stream. Syntax:
writable.writableCorked 
Return Value: It returns an integer value that represents the number of times writable.uncork() need to be called. Below examples illustrate the use of writable.writableCorked property in Node.js: Example 1: Output:
2
Example 2: Output:
hi
1
In the above example we have already called uncork() function once. So in order to fully uncork the stream you need to call the uncork() function only once so, the output is one. Reference: https://nodejs.org/api/stream.html#stream_writable_writablecorked
Comment

Explore