nathanpeck/s3-upload-stream — pull request #21 by konklone (2014-10-13 04:31:18+00:00)
Title: Use setiImmediate polyfill for browsers

`setImmediate` is not available in some browser environments, like Firefox and Chrome, so this brings in the [setImmediate polyfill](https://github.com/YuzuJS/setImmediate) through npm. It should [short-circuit and do nothing](https://github.com/YuzuJS/setImmediate/blob/master/setImmediate.js#L4-L6) when it's not needed, so there should be no downside to including it here, besides the addition of an npm dependency.

If the npm dependency is not desired, I also tested out an alternate approach in https://github.com/konklone/s3-upload-stream/commit/a3e120ce706f062a0badd51fd543be4bb497183b which simply falls back `setImmediate` to `setTimeout`. My understanding is that that works too, but is less efficient. Then again, [setImmediate.js](https://github.com/YuzuJS/setImmediate/blob/master/setImmediate.js) is doing a lot. The choice is yours -- what's submitted here is the polyfill.