Converted to node module

Converted to npm package
Added brower
Added browserify with minification
Updated Readme
This commit is contained in:
Marian Oancea
2014-11-05 19:46:01 +02:00
parent 3e174a0879
commit 4be4db5e6c
24 changed files with 1785 additions and 653 deletions

35
lib/browser_fix/xhr.js Normal file
View File

@ -0,0 +1,35 @@
/**
* Module dependencies.
*/
var global = (function() { return this; })(); // jshint ignore:line
/**
* XMLHttpRequest constructor.
*/
var XMLHttpRequest = window.XMLHttpRequest; // jshint ignore:line
/**
* Module exports.
*/
module.exports.XMLHttpRequest = XMLHttpRequest ? xhr : null;
/**
* XMLHttpRequest constructor.
*
* @param {Object) opts (optional)
* @api public
*/
function xhr(obj) {
var instance;
instance = new XMLHttpRequest(obj);
return instance;
}
if (XMLHttpRequest) xhr.prototype = XMLHttpRequest.prototype;