github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/helpers/format-hertz.js (about)

     1  import Helper from '@ember/component/helper';
     2  import { formatHertz } from 'nomad-ui/utils/units';
     3  
     4  /**
     5   * Hertz Formatter
     6   *
     7   * Usage: {{format-hertz hertz}}
     8   *
     9   * Outputs the frequency reduced to the largest supported unit size for which
    10   * the resulting number is larger than one.
    11   */
    12  function formatHertzHelper([hertz], { start }) {
    13    return formatHertz(hertz, start || 'MHz');
    14  }
    15  
    16  export default Helper.helper(formatHertzHelper);