Files
nomad/ui/app/helpers/format-bytes.js
2021-03-31 09:29:01 -07:00

17 lines
387 B
JavaScript

import Helper from '@ember/component/helper';
import { formatBytes } from 'nomad-ui/utils/units';
/**
* Bytes Formatter
*
* Usage: {{format-bytes bytes}}
*
* Outputs the bytes reduced to the largest supported unit size for which
* bytes is larger than one.
*/
function formatBytesHelper([bytes]) {
return formatBytes(bytes);
}
export default Helper.helper(formatBytesHelper);