Fill out threshold function documentation
0.2.1, js