-
-
Save Raynos/3c8812c0262b5ee0493b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function S(s) { | |
var _read = s.read | |
s.read = function read(callback) { | |
var chunk = _read.call(s) | |
if (chunk === null) { | |
s.once('readable', read) | |
} else { | |
cb(null, chunk) | |
} | |
} | |
return s | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment