mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
17 lines
387 B
JavaScript
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);
|