Sha256: a72c88c82cdd430a91334ec91a8ff9af9788584d24edae552e33073b95e7ce54

Contents?: true

Size: 434 Bytes

Versions: 3

Compression:

Stored size: 434 Bytes

Contents

var duplex = require("./index")
    , assert = require("assert")
    , through = require("through")

var readable = through()
    , writable = through(write)
    , written = 0
    , data = 0

var stream = duplex(writable, readable)

function write() {
    written++
}

stream.on("data", ondata)

function ondata() {
    data++
}

stream.write()
readable.emit("data")

assert.equal(written, 1)
assert.equal(data, 1)
console.log("DONE")

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/duplexer/test.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/duplexer/test.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/duplexer/test.js