powerdong / myProblems

我用到了,你可能用到
0 stars 1 forks source link

实现一个trim方法 #14

Open powerdong opened 4 years ago

powerdong commented 4 years ago
function trim(value) {
    var regEx = /(^\s*|\s*$)$/gi;
    return value.replace(regEx, "");
};