JavaScript function manipulation library