Give your javascript functions a chaining api.