main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
624 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
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 = 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;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.