massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / indexed-object.js
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');
5
6 var Object = global.Object;
7 var split = uncurryThis(''.split);
8
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);
14 }) ? function (it) {
15   return classof(it) == 'String' ? split(it, '') : Object(it);
16 } : Object;