Bump to v3.5.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:48:35 -08:00
parent 4ce1d5ddd3
commit 707fe171fc
29 changed files with 196 additions and 124 deletions

View File

@@ -29,7 +29,11 @@ define(['../internal/baseToString'], function(baseToString) {
target = (target + '');
var length = string.length;
position = (typeof position == 'undefined' ? length : nativeMin(position < 0 ? 0 : (+position || 0), length)) - target.length;
position = typeof position == 'undefined'
? length
: nativeMin(position < 0 ? 0 : (+position || 0), length);
position -= target.length;
return position >= 0 && string.indexOf(target, position) == position;
}

View File

@@ -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;
}

View File

@@ -57,7 +57,7 @@ define(['../internal/baseToString', '../internal/isIterateeCall', '../lang/isObj
if (options != null) {
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? +options.length || 0 : length;
length = 'length' in options ? (+options.length || 0) : length;
omission = 'omission' in options ? baseToString(options.omission) : omission;
} else {
length = +options || 0;