npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

null-writable

1.0.0 • Public • Published

null-writable

Build Status Coverage Status npm

This module provides a Writable which accepts all data and do nothing. It is like /dev/null for Node.js streams.

It implements _writev method so it is fast enough for buffered operations.

Requirements

This module requires Node >= 6.

Installation

npm install null-writable

Additionally for Typescript:

npm install -D @types/node

Usage

const { NullWritable } = require('null-writable')

Typescript:

import NullWritable from 'null-writable'

Transpiling this module with own settings in tsconfig.json:

{
  "compilerOptions": {
    "paths": {
      "null-writable": ["node_modules/null-writable/src/null-writable"]
    }
  }
}

constructor

const stream = new NullWritable(options)

Create new NullWritable instance.

Options are the same as for Writable constructor, like ie. highWaterMark.

License

Copyright (c) 2018 Piotr Roszatycki mailto:piotr.roszatycki@gmail.com

MIT

install

npm i null-writable

Downloadsweekly downloads

17

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability