Files
todo-frontend/node_modules/licia/indent.js
Agent d12eea7693
Some checks failed
continuous-integration/drone/push Build is failing
fix: 微信登录补充保存username和role
2026-04-04 07:35:21 +00:00

17 lines
412 B
JavaScript

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;