readable-stream
Advanced tools
Comparing version 3.1.0 to 3.1.1
'use strict'; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
var codes = {}; | ||
@@ -35,8 +23,6 @@ | ||
function (_Base) { | ||
_inherits(NodeError, _Base); | ||
_inheritsLoose(NodeError, _Base); | ||
function NodeError(arg1, arg2, arg3) { | ||
_classCallCheck(this, NodeError); | ||
return _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3))); | ||
return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; | ||
} | ||
@@ -123,3 +109,3 @@ | ||
msg += ". Received type ".concat(_typeof(actual)); | ||
msg += ". Received type ".concat(typeof actual); | ||
return msg; | ||
@@ -126,0 +112,0 @@ }, TypeError); |
@@ -80,3 +80,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._writableState.highWaterMark; | ||
@@ -90,3 +90,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._writableState && this._writableState.getBuffer(); | ||
@@ -100,3 +100,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._writableState.length; | ||
@@ -123,3 +123,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
if (this._readableState === undefined || this._writableState === undefined) { | ||
@@ -131,3 +131,3 @@ return false; | ||
}, | ||
set: function (value) { | ||
set: function set(value) { | ||
// we ignore the value if the stream | ||
@@ -134,0 +134,0 @@ // has not been initialized yet |
@@ -34,3 +34,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
var EElistenerCount = function (emitter, type) { | ||
var EElistenerCount = function EElistenerCount(emitter, type) { | ||
return emitter.listeners(type).length; | ||
@@ -68,3 +68,3 @@ }; | ||
} else { | ||
debug = function () {}; | ||
debug = function debug() {}; | ||
} | ||
@@ -192,3 +192,3 @@ /*</replacement>*/ | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
if (this._readableState === undefined) { | ||
@@ -200,3 +200,3 @@ return false; | ||
}, | ||
set: function (value) { | ||
set: function set(value) { | ||
// we ignore the value if the stream | ||
@@ -978,3 +978,3 @@ // has not been initialized yet | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._readableState.highWaterMark; | ||
@@ -988,3 +988,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._readableState && this._readableState.buffer; | ||
@@ -998,6 +998,6 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._readableState.flowing; | ||
}, | ||
set: function (state) { | ||
set: function set(state) { | ||
if (this._readableState) { | ||
@@ -1015,3 +1015,3 @@ this._readableState.flowing = state; | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._readableState.length; | ||
@@ -1018,0 +1018,0 @@ } |
@@ -213,3 +213,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
Object.defineProperty(Writable, Symbol.hasInstance, { | ||
value: function (object) { | ||
value: function value(object) { | ||
if (realHasInstance.call(this, object)) return true; | ||
@@ -221,3 +221,3 @@ if (this !== Writable) return false; | ||
} else { | ||
realHasInstance = function (object) { | ||
realHasInstance = function realHasInstance(object) { | ||
return object instanceof this; | ||
@@ -336,3 +336,3 @@ }; | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._writableState && this._writableState.getBuffer(); | ||
@@ -355,3 +355,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._writableState.highWaterMark; | ||
@@ -580,3 +580,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
return this._writableState.length; | ||
@@ -664,3 +664,3 @@ } | ||
enumerable: false, | ||
get: function () { | ||
get: function get() { | ||
if (this._writableState === undefined) { | ||
@@ -672,3 +672,3 @@ return false; | ||
}, | ||
set: function (value) { | ||
set: function set(value) { | ||
// we ignore the value if the stream | ||
@@ -675,0 +675,0 @@ // has not been initialized yet |
@@ -61,3 +61,3 @@ 'use strict'; | ||
next: function () { | ||
next: function next() { | ||
var _this = this; | ||
@@ -119,3 +119,3 @@ | ||
return this; | ||
}), _defineProperty(_Object$setPrototypeO, "return", function () { | ||
}), _defineProperty(_Object$setPrototypeO, "return", function _return() { | ||
var _this2 = this; | ||
@@ -138,3 +138,3 @@ | ||
var createReadableStreamAsyncIterator = function (stream) { | ||
var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { | ||
var _Object$create; | ||
@@ -161,3 +161,3 @@ | ||
}), _defineProperty(_Object$create, kHandlePromise, { | ||
value: function (resolve, reject) { | ||
value: function value(resolve, reject) { | ||
var data = iterator[kStream].read(); | ||
@@ -164,0 +164,0 @@ |
@@ -31,7 +31,7 @@ // Ported from https://github.com/mafintosh/end-of-stream with | ||
var onlegacyfinish = function () { | ||
var onlegacyfinish = function onlegacyfinish() { | ||
if (!stream.writable) onfinish(); | ||
}; | ||
var onfinish = function () { | ||
var onfinish = function onfinish() { | ||
writable = false; | ||
@@ -41,3 +41,3 @@ if (!readable) callback.call(stream); | ||
var onend = function () { | ||
var onend = function onend() { | ||
readable = false; | ||
@@ -47,7 +47,7 @@ if (!writable) callback.call(stream); | ||
var onerror = function (err) { | ||
var onerror = function onerror(err) { | ||
callback.call(stream, err); | ||
}; | ||
var onclose = function () { | ||
var onclose = function onclose() { | ||
if (readable && !(rs && rs.ended)) { | ||
@@ -62,3 +62,3 @@ return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); | ||
var onrequest = function () { | ||
var onrequest = function onrequest() { | ||
stream.req.on('finish', onfinish); | ||
@@ -65,0 +65,0 @@ }; |
{ | ||
"name": "readable-stream", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Streams3, a user-land copy of the stream library from Node.js", | ||
@@ -17,16 +17,2 @@ "main": "readable.js", | ||
"@babel/core": "^7.2.0", | ||
"@babel/plugin-proposal-async-generator-functions": "^7.2.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.2.0", | ||
"@babel/plugin-proposal-optional-catch-binding": "^7.2.0", | ||
"@babel/plugin-transform-arrow-functions": "^7.2.0", | ||
"@babel/plugin-transform-async-to-generator": "^7.2.0", | ||
"@babel/plugin-transform-block-scoping": "^7.2.0", | ||
"@babel/plugin-transform-classes": "^7.2.2", | ||
"@babel/plugin-transform-computed-properties": "^7.2.0", | ||
"@babel/plugin-transform-destructuring": "^7.2.0", | ||
"@babel/plugin-transform-for-of": "^7.2.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.2.0", | ||
"@babel/plugin-transform-shorthand-properties": "^7.2.0", | ||
"@babel/plugin-transform-spread": "^7.2.0", | ||
"@babel/plugin-transform-template-literals": "^7.2.0", | ||
"@babel/polyfill": "^7.0.0", | ||
@@ -57,3 +43,3 @@ "@babel/preset-env": "^7.2.0", | ||
"report": "nyc report --reporter=lcov", | ||
"update-browser-errors": "babel --presets @babel/env -o errors-browser.js errors.js" | ||
"update-browser-errors": "babel -o errors-browser.js errors.js" | ||
}, | ||
@@ -60,0 +46,0 @@ "repository": { |
19
372564
2501