Suggestions on how to handle Config

I really like the Data.Options library for dealing with foreign JS configs. I’m wondering if there is something similar for Purescript data types, with optional types etc. Something that doesn’t require me to declare a all or nothing Config each time. I found this:

And I’m thinking about updating it if there are no other options. Another idea I thought of is to simply declare a Config as it’s own type and then have a functionality to merge a default Config with what the user passed in.

Any recommendation on this?

Why not use purescript-options (which contains the Data.Options module you mentioned)? I think it works just fine with pure PS code. Sorry, I confused purescript-options with purescript-option, which I think is probably what you want.

1 Like

Ahh I hadn’t seen this package probably because of the similar name. Thank you @mhmdanas this is exactly what I’m looking for!

1 Like