You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a small thing, and you don't have to agree with me but, I consider that in these cases it would be more readable an API with a third param as an options object like:
set(key, value[, {clobber: true}]);
since when in code you know what that false/true means:
c.set('a-HEADER','more',{clobber: false});
What do you think?
The text was updated successfully, but these errors were encountered:
It just feels a little weird to have an options object when there is only one option. I'm trying to think of another case where we might need an option though.
@mikeal while I agree that it feels weird I think it is a positive change in terms of code readability. I, as most developers, read docs when I'm trying to use a certain feature, but when reading someone else's code I usually guess by the API what the method is doing.
So, in this particular case, I would expect a key, value params in a setter method, but a third param as boolean is not intuitive at all.
So, just my two cents, feel free to close this issue if you think it is useless.
Just a small thing, and you don't have to agree with me but, I consider that in these cases it would be more readable an API with a third param as an options object like:
since when in code you know what that false/true means:
What do you think?
The text was updated successfully, but these errors were encountered: