2121
2222'use strict' ;
2323
24- /*<replacement>*/
25-
26- var pna = require ( 'process-nextick-args' ) ;
27- /*</replacement>*/
28-
2924module . exports = Readable ;
3025
3126/*<replacement>*/
@@ -511,7 +506,7 @@ function emitReadable(stream) {
511506 if ( ! state . emittedReadable ) {
512507 debug ( 'emitReadable' , state . flowing ) ;
513508 state . emittedReadable = true ;
514- pna . nextTick ( emitReadable_ , stream ) ;
509+ process . nextTick ( emitReadable_ , stream ) ;
515510 }
516511}
517512
@@ -541,7 +536,7 @@ function emitReadable_(stream) {
541536function maybeReadMore ( stream , state ) {
542537 if ( ! state . readingMore ) {
543538 state . readingMore = true ;
544- pna . nextTick ( maybeReadMore_ , stream , state ) ;
539+ process . nextTick ( maybeReadMore_ , stream , state ) ;
545540 }
546541}
547542
@@ -586,7 +581,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
586581 var doEnd = ( ! pipeOpts || pipeOpts . end !== false ) && dest !== process . stdout && dest !== process . stderr ;
587582
588583 var endFn = doEnd ? onend : unpipe ;
589- if ( state . endEmitted ) pna . nextTick ( endFn ) ; else src . once ( 'end' , endFn ) ;
584+ if ( state . endEmitted ) process . nextTick ( endFn ) ; else src . once ( 'end' , endFn ) ;
590585
591586 dest . on ( 'unpipe' , onunpipe ) ;
592587 function onunpipe ( readable , unpipeInfo ) {
@@ -776,7 +771,7 @@ Readable.prototype.on = function (ev, fn) {
776771 if ( state . length ) {
777772 emitReadable ( this ) ;
778773 } else if ( ! state . reading ) {
779- pna . nextTick ( nReadingNextTick , this ) ;
774+ process . nextTick ( nReadingNextTick , this ) ;
780775 }
781776 }
782777 }
@@ -795,7 +790,7 @@ Readable.prototype.removeListener = function (ev, fn) {
795790 // support once('readable', fn) cycles. This means that calling
796791 // resume within the same tick will have no
797792 // effect.
798- pna . nextTick ( updateReadableListening , this ) ;
793+ process . nextTick ( updateReadableListening , this ) ;
799794 }
800795
801796 return res ;
@@ -811,7 +806,7 @@ Readable.prototype.removeAllListeners = function (ev) {
811806 // support once('readable', fn) cycles. This means that calling
812807 // resume within the same tick will have no
813808 // effect.
814- pna . nextTick ( updateReadableListening , this ) ;
809+ process . nextTick ( updateReadableListening , this ) ;
815810 }
816811
817812 return res ;
@@ -843,7 +838,7 @@ Readable.prototype.resume = function () {
843838function resume ( stream , state ) {
844839 if ( ! state . resumeScheduled ) {
845840 state . resumeScheduled = true ;
846- pna . nextTick ( resume_ , stream , state ) ;
841+ process . nextTick ( resume_ , stream , state ) ;
847842 }
848843}
849844
@@ -1019,7 +1014,7 @@ function endReadable(stream) {
10191014 debug ( 'endReadable' , state . endEmitted ) ;
10201015 if ( ! state . endEmitted ) {
10211016 state . ended = true ;
1022- pna . nextTick ( endReadableNT , state , stream ) ;
1017+ process . nextTick ( endReadableNT , state , stream ) ;
10231018 }
10241019}
10251020
0 commit comments