智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/c6/c6517f60f6b5f75d0e296a7dd82...

21 lines
342 B

exports = function(num) {
var j = num % 10;
var k = num % 100;
var indicator = 'th';
if (j == 1 && k != 11) {
indicator = 'st';
}
if (j == 2 && k != 12) {
indicator = 'nd';
}
if (j == 3 && k != 13) {
indicator = 'rd';
}
return num + indicator;
};
module.exports = exports;