Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

plurilizeME module helps you to singularize or pluralize a given word.

License

NotificationsYou must be signed in to change notification settings

mauroerta/pluralize-me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pluralizeME module helps you to singularize or pluralize a given word.

⚙ How to use

First of all, install pluralize-me

npm i pluralize-me

or

yarn add pluralize-me

Then, you just need to import the singular and plural functions:

import{singular,plural}from'pluralize-me';

And use it!

constpluralWord=plural(`foot`);// Will return the string  `feet`constsingularWord=singular(`feet`);// Will return the string `foot`

🎓 Example

import{singular,plural}from'pluralize-me';constsingulars=['foot','computer'];letplurals=[];console.log('Testing singular --> plural');singulars.forEach(word=>{constpluralWord=plural(word);plurals.push(pluralWord)console.log(`The plural of${word} is${pluralWord}`);});console.log('---------------------------');console.log('Testing plural --> singular');plurals.forEach(word=>{console.log(`The singular of${word} is${singular(word)}`);});

The output of this simple code will be:

Testing singular --> pluralThe plural of foot is feetThe plural of computer is computers---------------------------Testing plural --> singularThe singular of feet is footThe singular of computers is computer

About

plurilizeME module helps you to singularize or pluralize a given word.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp