{"size": 530, "ext": "js", "max_stars_repo_path": "public/javascripts/init.js", "max_stars_repo_name": "leomelin/throwa.com", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/javascripts/init.js", "max_issues_repo_name": "leomelin/throwa.com", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/javascripts/init.js", "max_forks_repo_name": "leomelin/throwa.com", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 37.8571428571, "max_line_length": 92, "alphanum_fraction": 0.6056603774}
window.throwaApp = window.angular.module('throwaApp', ['angularFileUpload', 'ui.bootstrap'])

window.throwaApp.service('helpers', function () {
  // Format bytes to size -string
  this.bytesToSize = function (bytes) {
    if (typeof bytes === 'undefined') return 'unknown'
    if (bytes === 0) return '0 Byte'
    var k = 1000
    var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
    var i = Math.floor(Math.log(bytes) / Math.log(k))
    return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i]
  }
})
