Sha256: c50612305d78acfa7383be9a8cb19a051e7b0c74bf2d2a62fe546c7e1f6325f4
Contents?: true
Size: 350 Bytes
Versions: 19
Compression:
Stored size: 350 Bytes
Contents
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; };
Version data entries
19 entries across 19 versions & 1 rubygems