A compact module to provide th
A compact module to provide the English ordinal letters following a numeral.
If other languages are required, please submit an issue.
ExamplesNumbers only, anything else will throw a TypeError
.
var ordinal = require('ordinal') ordinal(1) // '1st' ordinal(2) // '2nd' ordinal(3) // '3rd' ordinal(4) // '4th' ordinal(11) // '11th' ordinal(12) // '12th' ordinal(13) // '13th' ordinal(21) // '21st' ordinal(22) // '22nd' ordinal(23) // '23rd' ordinal(24) // '24th'
To get just the indicator:
var indicator = require('ordinal/indicator') indicator(1) // 'st' indicator(2) // 'nd' indicator(3) // 'rd' indicator(4) // 'th' indicator(11) // 'th' indicator(12) // 'th' indicator(13) // 'th' indicator(21) // 'st' indicator(22) // 'nd' indicator(23) // 'rd' indicator(24) // 'th' LICENSE MIT
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。