cloudworker-proxy
Version:
An api gateway for cloudflare workers
20 lines (15 loc) • 416 B
JavaScript
;
var getPolyfill = require('./polyfill');
var define = require('define-properties');
var stream = require('stream');
module.exports = function shimStreamFinished() {
var polyfill = getPolyfill();
if (polyfill !== stream) {
define(stream, {finished: polyfill}, {
finished: function testFinished() {
return stream.finished !== polyfill;
}
});
}
return polyfill;
};