main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
428 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var arrayWith = require('../internals/array-with');
|
---|
| 4 | var toIndexedObject = require('../internals/to-indexed-object');
|
---|
| 5 |
|
---|
| 6 | var $Array = Array;
|
---|
| 7 |
|
---|
| 8 | // `Array.prototype.with` method
|
---|
| 9 | // https://tc39.es/ecma262/#sec-array.prototype.with
|
---|
| 10 | $({ target: 'Array', proto: true }, {
|
---|
| 11 | 'with': function (index, value) {
|
---|
| 12 | return arrayWith(toIndexedObject(this), $Array, index, value);
|
---|
| 13 | }
|
---|
| 14 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.