src/index.js
function copySeries(series) {
  let newSeries = [], i, j;
  for (i = 0; i < series.length; i++) {
    let copy = {};
    for (j in series[i]) {
      if (series[i].hasOwnProperty(j)) {
        copy[j] = series[i][j];
      }
    }
    newSeries.push(copy);
  }
  return newSeries;
}
function copySeries(series) {
  let newSeries = [], i, j;
  for (i = 0; i < series.length; i++) {
    let copy = {};
    for (j in series[i]) {
      if (series[i].hasOwnProperty(j)) {
        copy[j] = series[i][j];
      }
    }
    newSeries.push(copy);
  }
  return newSeries;
}
function copySeries ( series ) { let newSeries = [ ] , i , j ; for ( i = 0 ; i < series . length ; i ++ ) { let copy = { } ; for ( j in series [ i ] ) { if ( series [ i ] . hasOwnProperty ( j ) ) { copy [ j ] = series [ i ] [ j ] ; } } newSeries . push ( copy ) ; } return newSeries ; }
creates a shallow copy of each element of the array elements are expected to be objects
creates a shallow copy of each element of the array elements are expected to be objects