Code coverage report for nodash/lib/string.js

Statements: 100% (8 / 8)      Branches: 100% (2 / 2)      Functions: 100% (4 / 4)      Lines: 100% (8 / 8)      Ignored: none     

All files » nodash/lib/ » string.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27      1     4 4 1   4       4       3       1        
/* vim: set et sw=2 ts=2: */
'use strict';
 
module.exports = {
 
  lines: function (string) {
    var result = string.split(/\n/);
    if (result[result.length - 1].length === 0) {
      delete result[result.length - 1];
    }
    return result;
  },
 
  unlines: function (lines) {
    return lines.join('\n');
  },
 
  words: function (string) {
    return string.split(/[\n\r\v\t ]/);
  },
 
  unwords: function (words) {
    return words.join(' ');
  }
 
};