Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update jquery client build

  • Loading branch information...
commit 3ae43ef9bbb3c2cda40316e4bf2df0616cd2a4fc 1 parent 807e4a1
@tedeh authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 build/jayson.jquery.min.js
View
6 build/jayson.jquery.min.js
@@ -1,3 +1,3 @@
-(function(c){function h(a,d,e){if("string"!==c.type(a))throw new TypeError(a+" must be a string");if(!d||!c.isPlainObject(d)&&!c.isArray(d))throw new TypeError(d+" must be an object or an array");a={jsonrpc:"2.0",params:d,method:a};a.id="undefined"===c.type(e)?Math.round(Math.random()*Math.pow(2,24)):e;return a}var b=function(a){if(!(this instanceof b))return new b(a);this.options=c.extend({dataType:"json",type:"POST",processData:!1,headers:{"content-type":"application/json"}},a||{})};window.Jayson=
-b;b.prototype.request=function(a,d,e,b){var f=c.extend({},this.options,{error:function(a,d,e){b(c.makeArray(arguments))},success:function(a){b(null,a)}});try{var g=h(a,d,e);f.data=f.processData?g:JSON.stringify(g)}catch(i){return b(i)}c.ajax(f)};c.fn.jayson=function(a){a=a||{};(new b(a)).request(a.method,a.params,a.id,function(d,b){if(d){if(c.isFunction(a.error))return a.error.apply(a.error,d)}else c.isFunction(a.response)&&(2===a.response.length?b.error?a.response(b.error):a.response(null,b.result):
-a.response(b))});return this};"function"===typeof define&&define("jayson",[],function(){return b})})(jQuery);
+(function(c,l){function h(a,d,g,e){if("string"!==c.type(a))throw new TypeError(a+" must be a string");if(!d||!c.isPlainObject(d)&&!c.isArray(d))throw new TypeError(d+" must be an object or an array");e=e||{};a={jsonrpc:"2.0",params:d,method:a};"undefined"===c.type(g)?a.id=("function"===typeof e.generator?e.generator:f)(a):a.id=g;return a}function f(){return Math.round(Math.random()*Math.pow(2,24))}var b=function(a){if(!(this instanceof b))return new b(a);this.options=c.extend({dataType:"json",type:"POST",
+processData:!1,generator:f,headers:{"Content-Type":"application/json"}},a||{})};window.Jayson=b;b.prototype.request=function(a,d,g,e){var b=c.extend({},this.options,{error:function(a,d,b){e(c.makeArray(arguments))},success:function(a,c,d){e(null,a)}});try{var f=h(a,d,g);b.data=b.processData?f:JSON.stringify(f)}catch(k){return e(k)}c.ajax(b)};c.fn.jayson=function(a){a=a||{};(new b(a)).request(a.method,a.params,a.id,{generator:a.generator},function(d,b){if(d){if(c.isFunction(a.error))return a.error.apply(a.error,
+d)}else c.isFunction(a.response)&&(2===a.response.length?b.error?a.response(b.error):a.response(null,b.result):a.response(b))});return this};"function"===typeof define&&define("jayson",[],function(){return b})})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.