1 | ;
|
2 | function trim(str, type) {
|
3 | switch (type) {
|
4 | case 1: return str.replace(/\s*/g, '');
|
5 | case 2: return str.replace(/(^\s*)|(\s*$)/g, '');
|
6 | case 3: return str.replace(/(^\s*)/g, '');
|
7 | case 4: return str.replace(/(\s*$)/g, '');
|
8 | default: return str.replace(/\s*/g, '');
|
9 | }
|
10 | }
|
11 | module.exports = trim;
|
12 | //# sourceMappingURL=trim.js.map |
\ | No newline at end of file |