{"ast":null,"code":"'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n// undocumented cb() API, needed for core, not for public API\n\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};","map":{"version":3,"sources":["/Users/tylerkoenig/Code/personal/react-scss2/node_modules/readable-stream/lib/internal/streams/destroy.js"],"names":["pna","require","destroy","err","cb","_this","readableDestroyed","_readableState","destroyed","writableDestroyed","_writableState","errorEmitted","nextTick","emitErrorNT","_destroy","undestroy","reading","ended","endEmitted","ending","finished","self","emit","module","exports"],"mappings":"AAAA;AAEA;;AAEA,IAAIA,GAAG,GAAGC,OAAO,CAAC,sBAAD,CAAjB;AACA;AAEA;;;AACA,SAASC,OAAT,CAAiBC,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,cAAL,CAAoBC,SAApB,GAAgC,KAAhC;AACA,SAAKD,cAAL,CAAoBS,OAApB,GAA8B,KAA9B;AACA,SAAKT,cAAL,CAAoBU,KAApB,GAA4B,KAA5B;AACA,SAAKV,cAAL,CAAoBW,UAApB,GAAiC,KAAjC;AACD;;AAED,MAAI,KAAKR,cAAT,EAAyB;AACvB,SAAKA,cAAL,CAAoBF,SAApB,GAAgC,KAAhC;AACA,SAAKE,cAAL,CAAoBO,KAApB,GAA4B,KAA5B;AACA,SAAKP,cAAL,CAAoBS,MAApB,GAA6B,KAA7B;AACA,SAAKT,cAAL,CAAoBU,QAApB,GAA+B,KAA/B;AACA,SAAKV,cAAL,CAAoBC,YAApB,GAAmC,KAAnC;AACD;AACF;;AAED,SAASE,WAAT,CAAqBQ,IAArB,EAA2BlB,GAA3B,EAAgC;AAC9BkB,EAAAA,IAAI,CAACC,IAAL,CAAU,OAAV,EAAmBnB,GAAnB;AACD;;AAEDoB,MAAM,CAACC,OAAP,GAAiB;AACftB,EAAAA,OAAO,EAAEA,OADM;AAEfa,EAAAA,SAAS,EAAEA;AAFI,CAAjB","sourcesContent":["'use strict';\n\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};"]},"metadata":{},"sourceType":"script"}