UNPKG

@extra-array/copy-within-update

Version:
13 lines (8 loc) 204 B
const array = require("extra-array"); var x = [1, 2, 3, 4, 5]; array.copyWithin$(x, 3); x; var x = [1, 2, 3, 4, 5]; array.copyWithin$(x, 3, 1); var x = [1, 2, 3, 4, 5]; array.copyWithin$(x, 3, 1, 2);