Sha256: a041cfcbcbbe3b29223e9dcf350249d3ca21ce6a80a40c41b7c599525d947de7

Contents?: true

Size: 357 Bytes

Versions: 84

Compression:

Stored size: 357 Bytes

Contents

exports = module.exports = trim;

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

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

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

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
ende-0.5.22 components/component/trim/0.0.1/index.js
ende-0.5.21 components/component/trim/0.0.1/index.js
ende-0.5.20 components/component/trim/0.0.1/index.js
ende-0.5.19 components/component/trim/0.0.1/index.js
ende-0.5.18 components/component/trim/0.0.1/index.js
ende-0.5.17 components/component/trim/0.0.1/index.js
ende-0.5.16 components/component/trim/0.0.1/index.js
ende-0.5.15 components/component/trim/0.0.1/index.js
ende-0.5.14 components/component/trim/0.0.1/index.js
ende-0.5.13 components/component/trim/0.0.1/index.js
ende-0.5.12 components/component/trim/0.0.1/index.js
ende-0.5.10 components/component/trim/0.0.1/index.js
ende-0.5.9 components/component/trim/0.0.1/index.js
ende-0.5.8 components/component/trim/0.0.1/index.js
ende-0.5.7 components/component/trim/0.0.1/index.js
ende-0.5.6 components/component/trim/0.0.1/index.js
ende-0.4.25 vendor/components/component-trim/index.js
ende-0.5.5 components/component/trim/0.0.1/index.js
ende-0.5.4 components/component/trim/0.0.1/index.js
ende-0.5.3 components/component/trim/0.0.1/index.js