Fast hyperbolic tangent approximation in Javascript

I'm doing some digital signal processing calculations in javascript, and I found that calculating the hyperbolic tangent (tanh) is a bit too expensive. This is how I currently approximate tanh: fu...