Node.js Stream writable.destroyed Property
The writable.destroyed property is an inbuilt application programming interface of Stream module which is used to check the writable.destroy() method is being called or not.
Return Value: This property returns true if writable.destroy() method is called before it else it returns false.
Below examples illustrate the use of writable.destroyed property in Node.js:
hi hello true
hi hello false
In the above example the output is false as writable.destroy() method is not called before calling the property writable.destroyed.