change filter to take scala.js.Function in sfrp-js