hilbert-transform transform. Installation $ npm i hilbert_transform Usage import { hilbertTransform } from 'hilbert_transform'; const cos = new Array(5).fill(0).map((_, i) => Math.cos(i)); const result = hilbertTransform(cos); // [0.015, 0.966, 1.058, 0.333, -0.367]; License MIT