dev-null
dev-null copied to clipboard
Handle object mode
Writing to dev-null in object mode gives:
(node:74521) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object
at validChunk (_stream_writable.js:265:10)
at DevNull.Writable.write (_stream_writable.js:299:21)
at Readable.ondata (_stream_readable.js:713:22)
at Readable.emit (events.js:203:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at Readable.push (_stream_readable.js:210:10)
at paging (/Users/saleemabdulhamid/Business/freelance/smartSolutionsGroup/medbill/caspio/caspioTables.js:27:42)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Seems that dev-null is an extension of the Writeable stream so you should be able to configure it: devnull({ objectMode: true }).