UNPKG

428 BJavaScriptView Raw
1'use strict';
2var $ = require('../internals/export');
3var arrayWith = require('../internals/array-with');
4var toIndexedObject = require('../internals/to-indexed-object');
5
6var $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});