@pengzhanbo/utils - v3.10.0
    Preparing search index...

    Interface FormatBytesOptions

    interface FormatBytesOptions {
        binary?: boolean;
        precision?: number;
        whitespace?: boolean;
    }
    Index
    binary?: boolean

    Whether to use binary units (1024 base) instead of decimal units (1000 base). Defaults to false. 是否使用二进制单位(以 1024 为基数)而非十进制单位(以 1000 为基数)。默认为 false

    precision?: number

    Number of decimal places to keep. Defaults to 1. 保留的小数位数。默认为 1

    whitespace?: boolean

    Whether to include whitespace between the number and the unit. Defaults to false. 是否保留数字与单位之间的空格。默认为 false