npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stackline/dev-null

v1.0.0

Published

Zero-dependency Node.js writable sink with exact dev-null compatibility and first-party types

Downloads

128

Readme

@stackline/dev-null

A maintained, zero-dependency writable sink with the established [email protected] behavior.

npm version npm downloads CI license

Docs and stream configurator | npm | GitHub | Migration | Security | Changelog

Current package version: 1.0.0

This package is an independent, maintained continuation of dev-null. It preserves the callable Node.js Writable sink, its asynchronous write boundary, and option forwarding while adding native ESM entry points, first-party TypeScript declarations, and reproducible release checks.

Install

npm install @stackline/dev-null

Preserve an existing require('dev-null') or import devNull from 'dev-null' without changing source code:

npm install dev-null@npm:@stackline/dev-null

Usage

CommonJS

const devNull = require('@stackline/dev-null');

source.pipe(devNull());

ESM

import devNull from '@stackline/dev-null';
import { pipeline } from 'node:stream/promises';

await pipeline(source, devNull());

Object mode and backpressure

import devNull from '@stackline/dev-null';

const sink = devNull({
  objectMode: true,
  highWaterMark: 16
});

sink.write({ id: 1 });
sink.end({ id: 2 });

All options are passed directly to Node's Writable constructor. Set objectMode: true before writing arbitrary JavaScript values.

API

devNull(options?)

Returns a Node.js Writable that accepts and discards every chunk. Calling the export with or without new is supported. _write completes asynchronously on the same timer boundary observed in [email protected], so standard backpressure, drain, finish, close, destroy, and error behavior remains owned by Node's stream implementation.

The package does not swallow upstream pipeline errors and does not convert invalid chunks. Byte mode rejects objects exactly as a normal Writable does.

When to use the native primitive

New code that does not need package compatibility can construct a sink directly:

import { Writable } from 'node:stream';

const sink = new Writable({
  write(_chunk, _encoding, callback) {
    callback();
  }
});

Use this package when a dependency already expects dev-null, when a shared factory keeps stream configuration consistent, or when first-party types and a tested Node-version contract are useful.

Compatibility

  • CommonJS and native ESM
  • First-party TypeScript declarations, including TypeScript 3.9 consumers
  • Node.js 12 and newer
  • Byte and object mode
  • Zero runtime dependencies

See COMPATIBILITY_CONTRACT.md and MIGRATION.md for the exact boundary and alias migration.

Security

Report vulnerabilities privately as described in SECURITY.md. Do not disclose an unpatched vulnerability in a public issue.

Provenance

The upstream source and authorship history are documented in UPSTREAM_AUDIT.md and NOTICE. The Stackline fork is not affiliated with or endorsed by the original author.

License

MIT. The original copyright and permission notice is preserved in LICENSE.