UNPKG

crypto-deck

Version:

[![Build Status](https://secure.travis-ci.org/indutny/crypto-deck.svg)](http://travis-ci.org/indutny/crypto-deck) [![NPM version](https://badge.fury.io/js/crypto-deck.svg)](http://badge.fury.io/js/crypto-deck)

20 lines (15 loc) 421 B
'use strict'; const inherits = require('inherits'); const Readable = require('stream').Readable; function MessageStream(type) { Readable.call(this, { objectMode: true }); this.type = type; } inherits(MessageStream, Readable); module.exports = MessageStream; MessageStream.prototype._read = function _read() { }; MessageStream.prototype.unwatch = function unwatch() { this.push(null); this.emit('unwatch'); };