Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

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

Something went wrong with that request. Please try again.