ordinal-numbers
v1.0.3
Published
Add the ordinal indicator to a integer
Downloads
745
Readme
Ordinal Numbers
Add the ordinal indicator to a integer
Install
npm install --save ordinal-numbers
# OR install it globally for cli use
npm install -g ordinal-numbers
Use
var ordinal = require('ordinal-numbers')
ordinal(0) // => '0'
ordinal(13) // => '13th'
or in with import
import ordinal from 'ordinal-numbers'
ordinal(61) // => '61st'
ordinal(22) // => '22nd'
or if you installed it globally,
ordinal 83 # => 83rd
API
ordinal(integer)
convert an integer to a string with the ordinal indicator appended.
Bugs
Please report any bugs to: https://github.com/makenova/ordinal-numbers/issues
License
Licensed under the MIT License: https://opensource.org/licenses/MIT