Is there a best practice for how to pass options to functions that take multiple options in ReasonML?
Two approaches:
-
bs-clean-deep
, takes all options as optional arguments and data in last:CleanDeep.cleanDeep( ~emptyStrings=false, ~emptyArrays=false, someJsObject )
-
bs-marky-markdown
, takes a record with options:MarkyMarkdown.marky( "# My Markdown String", ~options=MarkyMarkdown.options( ~highlightSyntax=false, () ), () )
Is any of these preferred, does it depend, or is it other preferred ways of doing this in ReasonML?