in app/components/primer/counter_component.rb [87:109]
def value
if @text.present?
@text
elsif @count.nil?
""
elsif @count == Float::INFINITY
"∞"
else
if @round
count = @has_limit ? [@count.to_i, @limit].min : @count.to_i
precision = count.between?(100_000, 999_999) ? 0 : 1
units = { thousand: "k", million: "m", billion: "b" }
str = number_to_human(count, precision: precision, significant: false, units: units, format: "%n%u")
else
@count = @count.to_i
str = number_with_delimiter(@has_limit ? [@count, @limit].min : @count)
end
str += "+" if @has_limit && @count.to_i > @limit
str
end
end