Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pluralizr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pluralizr

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Pluralizr

Pluralizr is a gem that takes a single word and returns the pluralized version of that word. It attempts to take into account various rules—like, handling words that end in 'y' where the 'y' is preceded by a vowel or consonant (i.e., day -> days versus baby -> babies)—as well as words of French, Greek and Latin origins.

Installation

Add this line to your application's Gemfile:

gem 'pluralizr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pluralizr

Usage

Require Pluralizr in your application (or in irb).

require 'pluralizr'

Then, simply use the Pluralizr.pluralize() method to get pluralizing!

$ Pluralizr.pluralize('day')
=> "days"

$ Pluralizr.pluralize('baby')
=> "babies"

$ Pluralizr.pluralize('foot')
=> "feet"

$ Pluralizr.pluralize('child')
=> "children"

$ Pluralizr.pluralize('pundit')
=> "pundits"

$ Pluralizr.pluralize('alumnus')
=> "alumni"

$ Pluralizr.pluralize('criterion')
=> "criteria"

Contributing

Making a contribution is easy and happily welcomed. Simply submit a pull request on GitHub at https://github.com/srndptylabs/pluralizr/pulls. Here are a few examples of things worth submitting a pull request for:

  • a word that's not pluralizing as expected
  • a word that should be added to the exception list
  • any bugs you encounter
  • improvements to the README file
  • and whatever else you can think of!

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 22 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc