JavaScript probability library