Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « trim « node_modules « eslint « tools - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 640c24cf302e60081b247e113907c79a4dc3db83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

exports = module.exports = trim;

function trim(str){
  return str.replace(/^\s*|\s*$/g, '');
}

exports.left = function(str){
  return str.replace(/^\s*/, '');
};

exports.right = function(str){
  return str.replace(/\s*$/, '');
};