ordinal-number-suffix
v0.1.2
Published
add suffixes to numbers (1st, 33rd, etc.)
Downloads
17,865
Readme
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