This npm package contains generic Runge-Kutta code that can be used to implement any explicit or embedded methods. The methods currently implemented for use are Forward Euler, Midpoint, Classic 4th order, Cash-Karp, Fehlberg 4-5, and Fehlberg 7-8.
Right now the acceleration calculation for pendulum is determined via formula based on position which makes the pendulum do some weird things if it goes too high, it would be beneficial to create a new pendulum update derivs method to calculate acceleration based on a gravity term so that the strange behavior would cease to exist.