Thread
#multiplatform
    d

    darkmoon_uk

    8 months ago
    Anyone aware of a Multiplatform library to format (human readable) data sizes e.g.
    17238
     → 
    17.24 kB
    ? Must include JS. Used Package Search but nothing came up 🤷
    I served my JS need by using this npm package and wrapping with:
    @JsModule("@tsmx/human-readable")
    @JsNonModule
    external object HumanReadable {
        fun fromBytes(byteCount: Long): String
    }
    j

    jw

    8 months ago
    This is like a 10-line function so you could always write it yourself
    d

    darkmoon_uk

    8 months ago