Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
679 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var IndexedObject = require('../internals/indexed-object');
|
---|
4 | var toIndexedObject = require('../internals/to-indexed-object');
|
---|
5 | var arrayMethodIsStrict = require('../internals/array-method-is-strict');
|
---|
6 |
|
---|
7 | var nativeJoin = [].join;
|
---|
8 |
|
---|
9 | var ES3_STRINGS = IndexedObject != Object;
|
---|
10 | var STRICT_METHOD = arrayMethodIsStrict('join', ',');
|
---|
11 |
|
---|
12 | // `Array.prototype.join` method
|
---|
13 | // https://tc39.es/ecma262/#sec-array.prototype.join
|
---|
14 | $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
|
---|
15 | join: function join(separator) {
|
---|
16 | return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
---|
17 | }
|
---|
18 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.