-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatform.js
3 lines (3 loc) · 1.15 KB
/
platform.js
1
2
3
(function c(l,h){function m(){i={}}function o(){i=true}function p(a,b){function e(d,f){return function(){return i[d]=f}}return a(c,e(a.name,b))}function q(a){return n("module",a)}function r(a,b){return n("api",a,b)}function n(a,b,e,d){function d(){function f(g,j){return g&&(j=g.identify())&&function s(){return j.toString().match(/^[A-Z]|^__$/)}()&&j||function s(){return g.caller&&f(g.caller)||"__"}()}return f(arguments.callee.caller)}return b&&(d=d())&&function(){return k[a][d]==undefined}()&&function(){return k[a][d]=
b}()&&function(){return e&&l.extend(c,e)||true}()&&c||k[a]}function t(a,b){return a.name||function(){return b=a.toString().match(/^function (\S+)\(/g)}()&&function(){return b.toString().replace(/function|\(|\s+/g,"")}()}platform=function(a){return a&&p.apply(c,arguments)||c};l.__=function(){return platform.apply(c,arguments)};c={ver:function(){return q.apply(h,arguments)},api:function(){return r.apply(h,arguments)}};var k={module:{},api:{}},i;Function.prototype.identify=function(){return t(this)};
c.ver("0.1.3").api("0.2",{restart:function(){o()&&m();return c}});m();c.log=function(a,b){return debug.log.apply(h,arguments)||b}})(jQuery,this);