Skip to content

A Node.js module that returns the plural or singular form of any noun

License

Notifications You must be signed in to change notification settings

philipszdavido/mypluralize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status npm version

mypluralize

A Node.js module that returns the plural or singular form of any noun

Installation

npm install mypluralize --save
yarn add mypluralize
bower install pluralize --save

Usage

JavaScript

var pluralise = require('mypluralize');
var boys = pluralise.getPlural('Boy');
console.log(boys);

var thief = pluralise.getSingular('Thieves');
console.log(thief);
Output should be 'Boys'
Output should be 'Thief'

TypeScript

import { getPlural } from 'mypluralize';
console.log(getPlural('Goose'))
console.log(getSingular('Guns'))
Output should be 'Geese'
Output should be 'Gun'

AMD

define(function(require,exports,module){
  var pluralise = require('mypluralize');
});

Test

npm run test