Fold javascript functions.