functional tools for javascript