| | |
| | | var global = require('../internals/global'); |
| | | var uncurryThis = require('../internals/function-uncurry-this'); |
| | | var fails = require('../internals/fails'); |
| | | var classof = require('../internals/classof-raw'); |
| | | |
| | | var split = ''.split; |
| | | var Object = global.Object; |
| | | var split = uncurryThis(''.split); |
| | | |
| | | // fallback for non-array-like ES3 and non-enumerable old V8 strings |
| | | module.exports = fails(function () { |
| | |
| | | // eslint-disable-next-line no-prototype-builtins -- safe |
| | | return !Object('z').propertyIsEnumerable(0); |
| | | }) ? function (it) { |
| | | return classof(it) == 'String' ? split.call(it, '') : Object(it); |
| | | return classof(it) == 'String' ? split(it, '') : Object(it); |
| | | } : Object; |