get_next_fact in javascript library