Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "format"

字符串格式化

Index

Variables

Functions

Variables

Const GB

GB: number = 2 ** 30

Const KB

KB: number = 2 ** 10

Const MB

MB: number = 2 ** 20

Const TB

TB: number = 2 ** 40

大小单位转换

Functions

formatSize

  • formatSize(size: number): string
  • 格式化文件长度

    example
    formatSize(file.size)

    Parameters

    • size: number

      文件大小

    Returns string

    格式化后文件大小字符串

Generated using TypeDoc