Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dynamicbalaji/dynamic-pluralize
NPM module creation
https://github.com/dynamicbalaji/dynamic-pluralize
chai definition dynamic javascript mocha mocha-chai npm pluralize travis-ci typescript
Last synced: about 2 months ago
JSON representation
NPM module creation
- Host: GitHub
- URL: https://github.com/dynamicbalaji/dynamic-pluralize
- Owner: dynamicbalaji
- License: mit
- Created: 2017-11-26T09:24:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T15:19:16.000Z (about 7 years ago)
- Last Synced: 2024-11-14T15:54:57.297Z (2 months ago)
- Topics: chai, definition, dynamic, javascript, mocha, mocha-chai, npm, pluralize, travis-ci, typescript
- Language: JavaScript
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/dynamicbalaji/dynamic-pluralize.svg?branch=master)](https://travis-ci.org/dynamicbalaji/dynamic-pluralize)
[![Coverage Status](https://coveralls.io/repos/github/dynamicbalaji/dynamic-pluralize/badge.svg?branch=master)](https://coveralls.io/github/dynamicbalaji/dynamic-pluralize?branch=master)# dynamic-pluralize
A Node.js module that returns the plural or singular form of any noun
## Installation
```sh
npm install dynamic-pluralize --save
yarn add dynamic-pluralize
bower install dynamic-pluralize --save
```## Usage
### Javascript
```javascript
var pluralise = require('dynamic-pluralize');
var boys = pluralise.getPlural('Boy');
```
```sh
Output should be 'Boys'
```### TypeScript
```typescript
import { getPlural } from 'dynamic-pluralize';
console.log(getPlural('Goose'))
```
```sh
Output should be 'Geese'
```### AMD
```javascript
define(function(require,exports,module){
var pluralise = require('dynamic-pluralize');
});
```## Test
```sh
npm run test
```## Set your npm defaults
```sh
npm set init.author.name “Balaji Ashokkumar”
npm set init.author.email “[email protected]”
npm set init.author.url “https://github.com/dynamicbalaji"
```## Initialize a npm package
```sh
npm init
``````sh
npm init -y // Skip questions and create package.json with defaults
```