Node.js writable sink
@stackline/dev-null
Discard stream chunks with the established `dev-null` contract, zero runtime dependencies, native ESM, and first-party types.
npm install @stackline/dev-null
Configuration builder
Stream sink
Chunks
one value per lineGenerated program
API
One function, normal Writable rules
The export is callable with or without `new`. Node owns validation, buffering, backpressure, lifecycle events, destroy, and pipeline errors.
| Surface | Contract |
|---|---|
devNull(options?) | Returns a `Writable` that asynchronously discards accepted chunks. |
objectMode | Required for arbitrary JavaScript values; byte mode remains the default. |
highWaterMark | Controls normal `write()` and `drain` backpressure in bytes or objects. |
signal | Forwarded to `Writable` on Node versions that support abortable streams. |
Release evidence
Compatibility is measured
The suite compares lifecycle, callback order, write return values, chunk decoding, and backpressure against the frozen upstream package.
Read the compatibility contract- 300
- differential stream executions
- 12–24
- Node runtime matrix
- 3.9+
- TypeScript compatibility
- 0
- runtime dependencies
Greenfield choice
Native Writable is valid
For new code with no package-name compatibility requirement, Node's constructor can define a sink directly. This package exists for a maintained drop-in, shared factory behavior, types, and release evidence.
import { Writable } from 'node:stream'
const sink = new Writable({
write(_chunk, _encoding, callback) {
callback()
}
})
Project resources
Migration, exact behavior, provenance, security, and machine-readable context.