640c24cf302e60081b247e113907c79a4dc3db83
[yaffs-website] / trim / index.js
1
2 exports = module.exports = trim;
3
4 function trim(str){
5   return str.replace(/^\s*|\s*$/g, '');
6 }
7
8 exports.left = function(str){
9   return str.replace(/^\s*/, '');
10 };
11
12 exports.right = function(str){
13   return str.replace(/\s*$/, '');
14 };