Skip to content

Instantly share code, notes, and snippets.

@Raynos Raynos/s.js Secret
Created Apr 11, 2013

Embed
What would you like to do?
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
You can’t perform that action at this time.