UNPKG

pnpm

Version:

Fast, disk space efficient package manager

26 lines (21 loc) 533 B
/** @license MIT License (c) copyright 2010-2016 original author or authors */ /** @author Brian Cavalier */ /** @author John Hann */ /** * A sink mixin that simply forwards event, end, and error to * another sink. * @param sink * @constructor */ export default function Pipe (sink) { this.sink = sink } Pipe.prototype.event = function (t, x) { return this.sink.event(t, x) } Pipe.prototype.end = function (t, x) { return this.sink.end(t, x) } Pipe.prototype.error = function (t, e) { return this.sink.error(t, e) }