mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Update handling of limit to the current es6 draft.
This commit is contained in:
@@ -13568,7 +13568,7 @@
|
||||
separator += '';
|
||||
if (separator == '' && reHasComplexSymbol.test(string)) {
|
||||
var strSymbols = stringToArray(string);
|
||||
return limit === undefined ? strSymbols : strSymbols.slice(0, limit < 0 ? 0 : limit);
|
||||
return limit === undefined ? strSymbols : strSymbols.slice(0, limit >>> 0);
|
||||
}
|
||||
}
|
||||
return string.split(separator, limit);
|
||||
|
||||
Reference in New Issue
Block a user