Pathologic was missing because of a .git folder inside.
[yaffs-website] / node_modules / core-js / modules / _array-copy-within.js
1 // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
2 'use strict';
3 var toObject = require('./_to-object')
4   , toIndex  = require('./_to-index')
5   , toLength = require('./_to-length');
6
7 module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
8   var O     = toObject(this)
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)
14     , inc   = 1;
15   if(from < to && to < from + count){
16     inc  = -1;
17     from += count - 1;
18     to   += count - 1;
19   }
20   while(count-- > 0){
21     if(from in O)O[to] = O[from];
22     else delete O[to];
23     to   += inc;
24     from += inc;
25   } return O;
26 };