智能照明系统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/3c/3c8ec8142aefccce83b05a3a2c5...

19 lines
415 B

var isNum = require('./isNum');
var isUndef = require('./isUndef');
var repeat = require('./repeat');
var regLineBegin = /^(?!\s*$)/gm;
exports = function(str, char, len) {
if (isNum(char)) {
len = char;
char = ' ';
}
if (isUndef(len)) len = 4;
if (isUndef(char)) char = ' ';
char = repeat(char, len);
return str.replace(regLineBegin, char);
};
module.exports = exports;