lib/utils.js
function totalLength (arr) {
  if (!arr) {
    return 0;
  }
  var total = 0;
  arr.forEach(function (item) {
    var length = item.length;
    length = length ? length : 0;
    total += length;
  });
  return total;
}
function totalLength (arr) {
  if (!arr) {
    return 0;
  }
  var total = 0;
  arr.forEach(function (item) {
    var length = item.length;
    length = length ? length : 0;
    total += length;
  });
  return total;
}
function totalLength ( arr ) { if ( ! arr ) { return 0 ; } var total = 0 ; arr . forEach ( function ( item ) { var length = item . length ; length = length ? length : 0 ; total += length ; } ) ; return total ; }
Gets the sum of the length of the items of an array
Gets the sum of the length of the items of an array