array-copyWithin

Polyfill for Array.prototype.copyWithin.

Downloads
7
Stars
5
Committers
1

array-copyWithin Build Status

Polyfill for Array.prototype.copyWithin.

Install

$ npm install --save-dev array-copywithin

Usage

Functionally:

var copyWithin = require('array-copywithin');

var array = copyWithin([1, 2, 3, 4, 5], 0, 3);

console.log(array);
// => [4, 5, 3, 4, 5]

From Array object:

require('array-copywithin/shim');

var array = [1, 2, 3, 4, 5].copyWithin(0, 3);

console.log(array);
// => [4, 5, 3, 4, 5]

License

MIT © Shogo Sensui

Package Rankings
Top 22.38% on Npmjs.org
Top 25.89% on Bower.io
Badges
Extracted from project README
Build Status testling badge