UNPKG

endpointjs

Version:

Endpoint.js enables modules within a web application to discover and use each other, whether that be on the same web page, other browser windows and tabs, iframes, servers and web workers in a reactive way by providing robust discovery, execution and stre

16 lines (12 loc) 367 B
var EventEmitter = require('events').EventEmitter; var inherit = require('util').inherits; inherit(Writer, EventEmitter); module.exports = Writer; function Writer() { if (!(this instanceof Writer)) { return new Writer(); } this._data = null; EventEmitter.call(this); } Writer.prototype.write = function(data) { this._data = data; };