mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Bump to v4.17.3.
This commit is contained in:
@@ -25,7 +25,10 @@ define(['./_baseClamp', './_baseToString', './toInteger', './toString'], functio
|
||||
*/
|
||||
function startsWith(string, target, position) {
|
||||
string = toString(string);
|
||||
position = baseClamp(toInteger(position), 0, string.length);
|
||||
position = position == null
|
||||
? 0
|
||||
: baseClamp(toInteger(position), 0, string.length);
|
||||
|
||||
target = baseToString(target);
|
||||
return string.slice(position, position + target.length) == target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user