Bump to v4.15.0.

This commit is contained in:
John-David Dalton
2016-08-11 23:29:12 -07:00
parent cbf5cb1162
commit 28663c1e27
54 changed files with 344 additions and 217 deletions

View File

@@ -1,20 +1,14 @@
import baseToString from './_baseToString.js';
import castSlice from './_castSlice.js';
import hasUnicode from './_hasUnicode.js';
import isIterateeCall from './_isIterateeCall.js';
import isRegExp from './isRegExp.js';
import reHasComplexSymbol from './_reHasComplexSymbol.js';
import stringToArray from './_stringToArray.js';
import toString from './toString.js';
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295;
/** Used for built-in method references. */
var stringProto = String.prototype;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeSplit = stringProto.split;
/**
* Splits `string` by `separator`.
*
@@ -48,11 +42,11 @@ function split(string, separator, limit) {
(separator != null && !isRegExp(separator))
)) {
separator = baseToString(separator);
if (separator == '' && reHasComplexSymbol.test(string)) {
if (!separator && hasUnicode(string)) {
return castSlice(stringToArray(string), 0, limit);
}
}
return nativeSplit.call(string, separator, limit);
return string.split(separator, limit);
}
export default split;