pluralize.cjs 407 B

12345678910111213141516
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. /**
  5. * Returns the plural form of the given word.
  6. *
  7. * @param {string} singular
  8. * @param {number} count
  9. * @returns {string}
  10. */
  11. function pluralize(singular, count) {
  12. return count === 1 ? singular : `${singular}s`;
  13. }
  14. module.exports = pluralize;