1 var global = require('../internals/global');
2 var uncurryThis = require('../internals/function-uncurry-this');
3 var fails = require('../internals/fails');
4 var classof = require('../internals/classof-raw');
6 var Object = global.Object;
7 var split = uncurryThis(''.split);
9 // fallback for non-array-like ES3 and non-enumerable old V8 strings
10 module.exports = fails(function () {
11 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
12 // eslint-disable-next-line no-prototype-builtins -- safe
13 return !Object('z').propertyIsEnumerable(0);
15 return classof(it) == 'String' ? split(it, '') : Object(it);