I have a variable on the server side that changes depending on a request from the client side which determines which function to use. The function looks otherwise similar to each other except that it starts calls for a different function. Therefore I was thinking if I could replace the function names with a variable.
Example of what I'm thinking:
sortFunction = req.body.sortValue
path.sortFunction arg1, arg2, (callback) -> if err ... else ...