No description or website provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
.npmignore
History.md
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

ordinal-number-suffix

add suffixes to numbers (1st, 33rd, etc.)

Installation

Install with component(1):

$ component install stephenmathieson/ordinal-number-suffix

API

ordinal(number)

Add the appropriate suffix to number.

Example

var ordinal = require('ordinal-number-suffix')
assert(ordinal(0) === '0th');
assert(ordinal(41) === '41st');
assert(ordinal(3) === '3rd');

License

MIT