3 ms·
Is preference not a valid reason? :) Other reason: the syntax is more explicit, and already familiar to anybody who has used Maps [1] I find your syntax a lit
by izolate 10y ago
Is preference not a valid reason? :)
Other reason: the syntax is more explicit, and already familiar to anybody who has used Maps [1]
I find your syntax a little confusing. It's not immediately obvious how I would set multiple cookies with different options, for instance.
[1] https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...
- franciscop 10y agoIt is totally a valid reason, that's what I wanted to say with fair enough (: I see, you could just call the same function few times with different options (preferred) as cookies(cookie1, opt1); cookies(cookie2, opt2); or concatenate them: cookies(cookie1, opt1)(cookie2, opt2); but this is arguably really strange syntax. I will add more examples to the readme.md to make it more clear :+1:
- Fifer82 10y agoUnlike izolate, I prefer your API. Great Library!
- franciscop 10y agoThank you