formatBandwidth()
function formatBandwidth(bandwidth, __namedParameters): string
Given a bandwidth value, formats it as a string with the appropriate unit.
While the bandwidth for the various records may vary, in all cases the required unit for entry is the same. It is always Mbps (Megabits per second).
- Up to three digits can be added to the right of the decimal point for speeds less than 10 Mbps.
- 768 Kbps service would be entered as 0.768 Mbps, while 1 Gbps service would be entered as 1000 Mbps.
- For all speeds equal or greater than 10 Mbps, speeds are rounded to the nearest whole number.
Parameters
Parameter | Type | Description |
---|---|---|
bandwidth | number | The bandwidth value to convert. |
__namedParameters | Pick <ConvertBandwidthOptions , "fromUnit" > | - |
Returns
string