js/libs/ember-1.5.1.js
function(array, idx, amt, objects) {
    if (array.replace) {
      return array.replace(idx, amt, objects);
    } else {
      return utils._replace(array, idx, amt, objects);
    }
  }
function(array, idx, amt, objects) {
    if (array.replace) {
      return array.replace(idx, amt, objects);
    } else {
      return utils._replace(array, idx, amt, objects);
    }
  }
Replaces objects in an array with the passed objects.

```javascript
var array = [1,2,3];
Ember.EnumerableUtils.replace(array, 1, 2, [4, 5]); // [1, 4, 5]

var array = [1,2,3];
Ember.EnumerableUtils.replace(array, 1, 1, [4, 5]); // [1, 4, 5, 3]

var array = [1,2,3];
Ember.EnumerableUtils.replace(array, 10, 1, [4, 5]); // [1, 2, 3, 4, 5]
```

@method replace
@param {Array} array The array the objects should be inserted into.
@param {Number} idx Starting index in the array to replace. If *idx* >=
length, then append to the end of the array.
@param {Number} amt Number of elements that should be removed from the array,
starting at *idx*
@param {Array} objects An array of zero or more objects that should be
inserted into the array at *idx*

@return {Array} The modified array.