open-nomad/ui/app/helpers/pluralize.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
238 B
JavaScript
Raw Normal View History

import Helper from '@ember/component/helper';
2019-03-26 04:24:11 +00:00
import { pluralize } from 'ember-inflector';
2017-09-19 14:47:10 +00:00
2019-03-26 04:24:11 +00:00
export function pluralizeHelper([term, count]) {
return count === 1 ? term : pluralize(term);
2017-09-19 14:47:10 +00:00
}
2019-03-26 04:24:11 +00:00
export default Helper.helper(pluralizeHelper);