UNPKG

onix-core

Version:
24 lines 580 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pluralize = void 0; const pluralize = (num, strOne, strTwo, strFive) => { strFive = strFive || strTwo; if ((strTwo === strFive) && (num > 1)) { return strTwo; } if ((num > 10) && (num < 20)) { return strFive; } var d = num % 10; if (d === 1) { return strOne; } else if ((d < 5) && (d !== 0)) { return strTwo; } else { return strFive; } }; exports.pluralize = pluralize; //# sourceMappingURL=Pluralize.js.map