colkito/mercado-bitcoin

View on GitHub
lib/mercado-bitcoin.min.js

Summary

Maintainability
A
0 mins
Test Coverage
/*! mercado-bitcoin 0.0.3 */
(function(){var t,e,n,r,u;t="undefined"!=typeof exports&&null!==exports?exports:this.conversion={},t.last=function(t,n,u){var o;return o=e(t)+("&symbol="+n),r(o,u)},t.average=function(t,n){var u;return u=e(t),r(u,n)},t.convert=function(t,n,u){var o;return o=e(t)+("&amount="+n),r(o,u)},e=function(t){return"http://www.mercado-bitcoin.com.ar/api/"+t+"?format=json"},r=function(t,e){return n(t,function(t,n){var r;try{return r=JSON.parse(n),e(null,r)}catch(u){return t=u,e(t,null)}})},n=function(t,e){var n;return n=u(),n.open("GET",t,!0),n.onreadystatechange=function(){return 4===n.readyState?200===n.status?e(!1,n.responseText):e(!0,null):void 0},n.send(null)},u=function(){var t;return"undefined"!=typeof ActiveXObject&&null!==ActiveXObject?t=new ActiveXObject("Microsoft.XMLHTTP"):"undefined"!=typeof XMLHttpRequest&&null!==XMLHttpRequest?t=new XMLHttpRequest:"undefined"!=typeof require&&null!==require&&(t=new(require("xmlhttprequest").XMLHttpRequest)),t}}).call(this);