UNPKG

pluralizers

Version:

Repository of localized pluralization functions

14 lines (9 loc) 205 B
'use strict'; module.exports = function(entry, count) { var key; if (count === 0 && 'zero' in entry) { key = 'zero'; } key = key || (count === 1 ? 'one' : 'other'); return entry[key]; };