%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/nodejs/undici/lib/mock/
Upload File :
Create Path :
Current File : //usr/share/nodejs/undici/lib/mock/pluralizer.js

'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 }
  }
}

Zerion Mini Shell 1.0