
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
A compact Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT) library for JavaScript.
fftjs is a compact Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT) library for JavaScript. It implements the Cooley-Tukey radix-2 Decimation In Time (DIT) algorithm.
This package is available on npm
.
npm install --save fftjs
The input can be either an array:
// must be a power of 2.
let signal = [0.13, -0.45, ....];
Or an object consisting of a field named real
let signal = {
'real': [0.13, -0.45, ....]
};
Then, you can compute the FFT like so:
const fftjs = require('fftjs');
let phasors = fftjs.fft(signal);
console.log("phasors: " + phasors);
/*
phasors: {
real: [...],
imag: [...]
};
*/
phasors
now contains the complex values in the ferquency domain representation of the signal!
We can also reconstruct our original time-domain signal from the complex phasors.
let reconstructedSignal = jsfft.ifft(phasors);
console.log("reconstructed signal: " + reconstructedSignal);
/*
reconstruted signal: [0.13, -0.45, ....];
reconstructedSignal should be identical to original signal (with very slight rounding errors caused by JavaScript)
*/
FAQs
A compact Fast Fourier Transform (FFT) and Inverse Fast Fourier Transform (IFFT) library for JavaScript.
The npm package fftjs receives a total of 7,121 weekly downloads. As such, fftjs popularity was classified as popular.
We found that fftjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.