Named parameters misses the point. Functions should do one thing and only one thing. This is why we have cos, sin, and tan and not a universal function for trigonometry: trig(mode='cos', ...). Such functions often become cumbersome to use since they are essentially multiple functions baked into one.
Religiously splitting functions with boolean arguments doesn't always result in more maintainable code. Instead of trigonometry functions, how would you refactor JS's fetch() with many of its behaviour-altering flags?
as @flavius29663 said (https://news.ycombinator.com/item?id=28593669) you can use the builder pattern
FetchBuilder()
.withUrl(ur)
.withMode("cors")
.withCache(true)
.withHeader('Content-Type', 'application/json')
.accept('*/*')
.post()
.then(response => response.json())
.then(data => console.log(data));