• Returns a file size in bytes from a humanly readable string Note: b and B are both parsed as bytes and not as bit or byte.

    Parameters

    • value: string

      file size in human-readable format

    • forceBinary: boolean = false

      for backwards compatibility this allows values to be base 2 (so 2KB means 2048 bytes instead of 2000 bytes)

    Returns null | number

    or null if string could not be parsed