conversion-library / sizeConversionString
Function: sizeConversionString()
ts
function sizeConversionString(
value: number,
fromUnit: SizeUnitType,
symbol: string): string
sizeConversionString
version: v0.0.12+Parameters
• value: number
Enter value
• fromUnit: SizeUnitType
Enter value unit B/KB/MB/GB/TB/PB/EB/ZB/YB
• symbol: string
= ''
Enter symbol, Used for connecting strings, default is ''
Returns
string
size string
Example
ts
sizeConversionString(5000, 'GB')
// 4TB904GB
sizeConversionString(5000, 'GB', '-')
// 4TB-904GB