Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
495 B
Text
29 lines
495 B
Text
'use strict'
|
|
|
|
const singulars = {
|
|
pronoun: 'it',
|
|
is: 'is',
|
|
was: 'was',
|
|
this: 'this'
|
|
}
|
|
|
|
const plurals = {
|
|
pronoun: 'they',
|
|
is: 'are',
|
|
was: 'were',
|
|
this: 'these'
|
|
}
|
|
|
|
module.exports = class Pluralizer {
|
|
constructor (singular, plural) {
|
|
this.singular = singular
|
|
this.plural = plural
|
|
}
|
|
|
|
pluralize (count) {
|
|
const one = count === 1
|
|
const keys = one ? singulars : plurals
|
|
const noun = one ? this.singular : this.plural
|
|
return { ...keys, count, noun }
|
|
}
|
|
}
|