2016-10-10 03:43:44 +02:00
|
|
|
// @@split logic
|
2017-04-20 03:09:25 +02:00
|
|
|
require('./$.fix-re-wks')('split', 2, function(defined, SPLIT, $split){
|
2016-10-10 03:43:44 +02:00
|
|
|
// 21.1.3.17 String.prototype.split(separator, limit)
|
2017-04-20 03:09:25 +02:00
|
|
|
return function split(separator, limit){
|
|
|
|
'use strict';
|
2016-10-10 03:43:44 +02:00
|
|
|
var O = defined(this)
|
|
|
|
, fn = separator == undefined ? undefined : separator[SPLIT];
|
2017-04-20 03:09:25 +02:00
|
|
|
return fn !== undefined
|
|
|
|
? fn.call(separator, O, limit)
|
|
|
|
: $split.call(String(O), separator, limit);
|
|
|
|
};
|
2016-10-10 03:43:44 +02:00
|
|
|
});
|