UNPKG

pouchdb-replication-stream

Version:
16 lines (13 loc) 348 B
'use strict'; var through = require('through2').obj; module.exports = function () { return through(function (chunk, _, next) { // this only applies in the browser /* istanbul ignore next */ if (!(chunk instanceof Buffer) && Buffer.isBuffer(chunk)) { chunk = new Buffer(chunk); } this.push(chunk); next(); }); };