API Reference

Returns a string of a number with the ordinal suffix added.

function ordinal(n: number): string

// Example:

ordinal(2) //=> "2nd"
ordinal(3) //=> "3rd"
ordinal(4) //=> "4th"