增加晶全app静态页面
This commit is contained in:
15
node_modules/vk-uview-ui/libs/function/trim.js
generated
vendored
Normal file
15
node_modules/vk-uview-ui/libs/function/trim.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
function trim(str, pos = 'both') {
|
||||
if (pos == 'both') {
|
||||
return str.replace(/^\s+|\s+$/g, "");
|
||||
} else if (pos == "left") {
|
||||
return str.replace(/^\s*/, '');
|
||||
} else if (pos == 'right') {
|
||||
return str.replace(/(\s*$)/g, "");
|
||||
} else if (pos == 'all') {
|
||||
return str.replace(/\s+/g, "");
|
||||
} else {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
export default trim
|
Reference in New Issue
Block a user