]> git.r.bdr.sh - rbdr/dotfiles/blob
aa5aaf4145ea58e0413bc814c7e27336839d2058
[rbdr/dotfiles] /
1 'use strict';
2
3 var value = require('../../../object/valid-value')
4 , toInteger = require('../../../number/to-integer')
5
6 , max = Math.max, min = Math.min;
7
8 module.exports = function (searchString/*, position*/) {
9 var start, self = String(value(this));
10 start = min(max(toInteger(arguments[1]), 0), self.length);
11 return (self.indexOf(searchString, start) === start);
12 };