XMLHttpRequest ready state map for Node.js and the browser.
var state = require('xhr-readystate');
if (xhr.readyState == state.DONE) console.log(xhr.responseText);
$ component install wilmoore/xhr-readystate.js
$ bower install xhr-readystate.js
$ volo add wilmoore/xhr-readystate.js
-
download
% curl -#O https://raw.github.com/wilmoore/xhr-readystate.js/master/xhr-readystate.js
-
use
<script src="xhr-readystate.js"></script>
MIT