Comparing version 0.0.11 to 0.0.13
@@ -65,1 +65,5 @@ function Alite(XMLHttpRequest) { | ||
} | ||
if (typeof module === 'object' && typeof define !== 'function') { | ||
module.exports = Alite; | ||
} |
@@ -1,2 +0,2 @@ | ||
function Alite(e){function t(e){var t=e&&e.responseText&&"{"==e.responseText[0]||"["==e.responseText[0];return{request:e,data:t?JSON.parse(e.responseText):e.responseText}}function n(n,r,s,o){return new Promise(function(u,i){var a=new e;if(a.onreadystatechange=function(){4==a.readyState&&(a.status>=200&&a.status<300?u(t(a)):i(t(a)))},a.open(n,r),a.setRequestHeader("content-type","application/json"),o)for(var c in o)a.setRequestHeader(c,o[c]);a.send(s?JSON.stringify(s):void 0)})}return e=e||this.XMLHttpRequest,{get:function(e,t){return n("GET",e,void 0,t)},"delete":function(e,t){return n("DELETE",e,void 0,t)},post:function(e,t,r){return n("POST",e,t,r)},put:function(e,t,r){return n("PUT",e,t,r)},patch:function(e,t,r){return n("PATCH",e,t,r)}}} | ||
function Alite(e){function t(e){var t=e&&e.responseText&&"{"==e.responseText[0]||"["==e.responseText[0];return{request:e,data:t?JSON.parse(e.responseText):e.responseText}}function n(n,r,o,s){return new Promise(function(u,i){var a=new e;if(a.onreadystatechange=function(){4==a.readyState&&(a.status>=200&&a.status<300?u(t(a)):i(t(a)))},a.open(n,r),a.setRequestHeader("content-type","application/json"),s)for(var f in s)a.setRequestHeader(f,s[f]);a.send(o?JSON.stringify(o):void 0)})}return e=e||this.XMLHttpRequest,{get:function(e,t){return n("GET",e,void 0,t)},"delete":function(e,t){return n("DELETE",e,void 0,t)},post:function(e,t,r){return n("POST",e,t,r)},put:function(e,t,r){return n("PUT",e,t,r)},patch:function(e,t,r){return n("PATCH",e,t,r)}}}"object"==typeof module&&"function"!=typeof define&&(module.exports=Alite); | ||
//# sourceMappingURL=alite.min.js.map |
{ | ||
"name": "alite", | ||
"version": "0.0.11", | ||
"version": "0.0.13", | ||
"description": "Tiny ajax helper", | ||
@@ -5,0 +5,0 @@ "main": "plite.js", |
# Alite | ||
A simple, tiny (600 bytes gzipped and minified) Promise-based AJAX library. | ||
A simple, tiny (600ish bytes gzipped and minified) Promise-based AJAX library. | ||
@@ -5,0 +5,0 @@ This requires Promise support. In older browsers, Promises can be shimmed |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6107
58