1 // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
3 var toObject = require('./_to-object')
4 , toIndex = require('./_to-index')
5 , toLength = require('./_to-length');
7 module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
9 , len = toLength(O.length)
10 , to = toIndex(target, len)
11 , from = toIndex(start, len)
12 , end = arguments.length > 2 ? arguments[2] : undefined
13 , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
15 if(from < to && to < from + count){
21 if(from in O)O[to] = O[from];