respect options in js