qianlongo / fe-handwriting

手写各种js Promise、apply、call、bind、new、deepClone....

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

12-trim实现的正则问题

coderhaoo opened this issue · comments

你好,return this.replace(/^\s+|\s+$/, '')应修改为 return this.replace(/^\s+|\s+$/g, '');

你好,return this.replace(/^\s+|\s+$/, '')应修改为 return this.replace(/^\s+|\s+$/g, '');
棒棒,谢谢你帮忙发现了这个问题,已经修复了哈