Socket
Socket
Sign inDemoInstall

thr

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    thr

reduced overhead transform stream


Version published
Maintainers
1
Install size
4.97 kB
Created

Readme

Source

thr

reduced overhead transform stream. same interface as through2 but lighter

install

$ npm i thr

use

var thr = require('thr')
var t  = thr(function (msg, _, cb) {

  //push or change the incoming data
  this.push(msg)

  //callback moves stream forward to next chunk
  cb()
}, null, {objectMode:true}) // the default is objectMode:true
// btw `null`, and `opts` here after the function are both optional

//pipe to it from some source stream, like readable
readable.pipe(t)

Keywords

FAQs

Last updated on 27 Oct 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc