How to Create Flexible JavaScript APIs with Functional Options