New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

eventuate-stream

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventuate-stream

Create a node-style duplex stream from an eventuate

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

eventuate-stream

NPM version Build Status Coverage Status

Create a node-style duplex stream from an eventuate

example

var eventuate       = require('eventuate'),
    eventuateStream = require('eventuate-stream'),
    jsonstream      = require('jsonstream')

var request = eventuate()
var requestStream = eventuateStream(request)

requestStream.pipe(jsonstream.stringify(false)).pipe(process.stdout)

request(function onRequest (req) {
    console.log('\nGot a request for resource: ' + req.resource)
})

requestStream.write({ resource: '/something' })
requestStream.write({ resource: '/something/else' })

api

var eventuateStream = require('eventuate-stream'),
    event           = require('eventuate')()

var stream = eventuateStream(event)

Create a duplex object-mode stream. Anything written to the stream will be produced by the eventuate, and anything produced by the eventuate will be readable/emitted via the stream.

install

With npm do:

npm install eventuate-stream

testing

npm test [--dot | --spec] [--grep=pattern]

Specifying --dot or --spec will change the output from the default TAP style. Specifying --grep will only run the test files that match the given pattern.

coverage

npm run coverage [--html]

This will output a textual coverage report. Including --html will also open an HTML coverage report in the default browser.

FAQs

Package last updated on 01 Oct 2015

Did you know?

Socket

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