module

Tokei::Api::Services::BadgeService

Shared: badge data generation

Class methods

format_number(num : Int32) : String

Format e.g. 1200 -> "1.2k"

Source
generate(badge_type : String, analysis) : NamedTuple(schemaVersion: Int32, label: String, message: String, color: String)

Generate badge JSON (shields.io compatible)

Source