Sample data
const data = new ComplexArray(1024);
data.map((value, i, n) => {
  value.real = (i > n/3 && i < 2*n/3) ? 1 : 0;
});
      
Transform (in place):
data.FFT();
Simple low pass filter:
data.map((freq, i, n) => {
  if (i > n/5 && i < 4*n/5) {
    freq.real = 0;
    freq.imag = 0;
  }
});
      
Transform back:
data.InvFFT();
... or all in one step
data.frequencyMap((freq, i, n) => {
  if (i > n/5 && i < 4*n/5) {
    freq.real = 0;
    freq.imag = 0;
  }
});
      
>