array-copywithin

1.1.0 • Public • Published

array-copyWithin Build Status

Polyfill for Array.prototype.copyWithin.

testling badge

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 Sidebar

Install

npm i array-copywithin

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • 1000ch