pluralize.js 253 B

123456789101112
  1. 'use strict';
  2. /**
  3. * Returns the plural form of the given word.
  4. *
  5. * @param {string} singular
  6. * @param {number} count
  7. * @returns {string}
  8. */
  9. module.exports = function pluralize(singular, count) {
  10. return count === 1 ? singular : `${singular}s`;
  11. };