withOptions function

Safe way to temporarily override options()