Code coverage report for master/startsWith.js

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

All files » master/ » startsWith.js
1 2 3 4 5 6 7 8 9 101 1   1 30 30 30 30    
var makeString = require('./helper/makeString');
var toPositive = require('./helper/toPositive');
 
module.exports = function startsWith(str, starts, position) {
  str = makeString(str);
  starts = '' + starts;
  position = position == null ? 0 : Math.min(toPositive(position), str.length);
  return str.lastIndexOf(starts, position) === position;
};