this post was submitted on 15 Oct 2024
10 points (100.0% liked)
JavaScript
2004 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
My recommendation for APIs that have optional parameters is to have an optional last
options
parameter, every property of which can be left unset. Makes it far clearer to the caller what those properties do.