mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Bump to v4.11.0.
This commit is contained in:
8
split.js
8
split.js
@@ -8,6 +8,12 @@ import toString from './toString';
|
||||
/** 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`.
|
||||
*
|
||||
@@ -45,7 +51,7 @@ function split(string, separator, limit) {
|
||||
return castSlice(stringToArray(string), 0, limit);
|
||||
}
|
||||
}
|
||||
return string.split(separator, limit);
|
||||
return nativeSplit.call(string, separator, limit);
|
||||
}
|
||||
|
||||
export default split;
|
||||
|
||||
Reference in New Issue
Block a user