mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Bump to v3.5.0.
This commit is contained in:
@@ -26,7 +26,10 @@ define(['../internal/baseToString'], function(baseToString) {
|
||||
*/
|
||||
function startsWith(string, target, position) {
|
||||
string = baseToString(string);
|
||||
position = position == null ? 0 : nativeMin(position < 0 ? 0 : (+position || 0), string.length);
|
||||
position = position == null
|
||||
? 0
|
||||
: nativeMin(position < 0 ? 0 : (+position || 0), string.length);
|
||||
|
||||
return string.lastIndexOf(target, position) == position;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user