This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this shit is the dumb... ignore pls */ | |
function clone(obj){ | |
if(obj == null || typeof(obj) != 'object') | |
return obj; | |
var temp = {}; | |
for(var key in obj) temp[key] = clone(obj[key]); | |
return temp; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __tailingFn () { | |
for (var i = arguments.length; i--;) { | |
if (typeof arguments[i] == 'function') { | |
var fn = arguments[i]; | |
arguments[i] = undefined; | |
return fn; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dashboard.Format = { | |
types: { | |
bytes: ['b', 'kb', 'MB', 'GB', 'TB', 'PB'], | |
integer: ['', 'K', 'M', 'B', 'T', 'P'] | |
}, | |
abbreviate: function(metric, value){ | |
var i = value ? Math.floor(Math.log(value)/Math.log(metric.devisor)) : 0; | |
return (value/Math.pow(metric.devisor, Math.floor(i))).round(2).format({ | |
group: ',', |
NewerOlder