fix(striker-ui): simplify convert from byte to upper binary byte unit(s)

main
Tsu-ba-me 2 years ago
parent 0312588535
commit 837dc3028d
  1. 3
      striker-ui/lib/format_data_size_wrappers/index.ts
  2. 6
      striker-ui/lib/format_data_size_wrappers/toBinaryByte.ts

@ -1,4 +1,5 @@
import dsize from './dsize'; import dsize from './dsize';
import dsizeToByte from './dsizeToByte'; import dsizeToByte from './dsizeToByte';
import toBinaryByte from './toBinaryByte';
export { dsize, dsizeToByte }; export { dsize, dsizeToByte, toBinaryByte };

@ -0,0 +1,6 @@
import { dSizeStr } from 'format-data-size';
const toBinaryByte = (value: bigint): string | undefined =>
dSizeStr(value, { toUnit: 'ibyte' });
export default toBinaryByte;
Loading…
Cancel
Save