Code coverage report for master/count.js

Statements: 100% (7 / 7)      Branches: 100% (4 / 4)      Functions: 100% (1 / 1)      Lines: 100% (6 / 6)      Ignored: none     

All files » master/ » count.js
1 2 3 4 5 6 7 8 9 10 111   1 15 15   15   6    
var makeString = require('./helper/makeString');
 
module.exports = function(str, substr) {
  str = makeString(str);
  substr = makeString(substr);
 
  if (str.length === 0 || substr.length === 0) return 0;
  
  return str.split(substr).length - 1;
};