Rearrange array elements by index array
npm install array-rearrangejs
const reorder = require('array-rearrange')
let arr = reorder([9,8,7,6], [3,2,1,0]) // [6,7,8,9]
let arr2 = reorder([3,3, 2,2, 1,1], [2,1,0]) // [1,1, 2,2, 3,3]
`
API
$3
Shuffle elements in array according to the index array passed. Permutes original array. index array should contain unique indexes. Pass stride` to indicate groups of elements to shuffle.