UNPKG

crossfilter2

Version:

Fast multidimensional filtering for coordinated views.

7 lines (6 loc) 207 B
export default (array, index, deep) => { for (var i = 0, n = index.length, copy = deep ? JSON.parse(JSON.stringify(array)) : new Array(n); i < n; ++i) { copy[i] = array[index[i]]; } return copy; }