Sha256: ae653ae2c7af9ec5d0d02788d5908e66f43f0a958b2d75d8b055d301d14ef97d
Contents?: true
Size: 596 Bytes
Versions: 46
Compression:
Stored size: 596 Bytes
Contents
"use strict"; var toInteger = require("../../../number/to-integer") , value = require("../../../object/valid-value") , isValue = require("../../../object/is-value") , min = Math.min , max = Math.max; module.exports = function (searchString /*, endPosition*/) { var self, start, endPos; self = String(value(this)); searchString = String(searchString); endPos = arguments[1]; start = (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - searchString.length; return start < 0 ? false : self.indexOf(searchString, start) === start; };
Version data entries
46 entries across 46 versions & 3 rubygems