gitlab-org--gitlab-foss/app/helpers/storage_helper.rb
2018-09-06 17:33:46 -07:00

9 lines
249 B
Ruby

# frozen_string_literal: true
module StorageHelper
def storage_counter(size_in_bytes)
precision = size_in_bytes < 1.megabyte ? 0 : 1
number_to_human_size(size_in_bytes, delimiter: ',', precision: precision, significant: false)
end
end