Skip to content

bytes

Contains utility functions for byte counts.

FunctionDescription
formatBytesRenders a byte count the way a file manager does, so a running total answers “is this getting huge?” at a glance. Past the largest unit the number keeps growing rather than starting over, because under-reporting a size by a factor of 1024 is worse than an ungainly number.