Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
511 bytes
|
Line | |
---|
1 | var fails = require('../internals/fails');
|
---|
2 | var classof = require('../internals/classof-raw');
|
---|
3 |
|
---|
4 | var split = ''.split;
|
---|
5 |
|
---|
6 | // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
---|
7 | module.exports = fails(function () {
|
---|
8 | // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
---|
9 | // eslint-disable-next-line no-prototype-builtins -- safe
|
---|
10 | return !Object('z').propertyIsEnumerable(0);
|
---|
11 | }) ? function (it) {
|
---|
12 | return classof(it) == 'String' ? split.call(it, '') : Object(it);
|
---|
13 | } : Object;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.