Javascript library providing function hooking