Re:Show HN: cookies.js, making cookies a delight to work wit...
by franciscop on Thursday September 08, 2016 @04:51AM
(#12451314)
It 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:
Re:Show HN: cookies.js, making cookies a delight to work wit...
by Fifer82 on Thursday September 08, 2016 @06:19AM
(#12451700)
Unlike izolate, I prefer your API. Great Library!
Re:Show HN: cookies.js, making cookies a delight to work wit...
by franciscop on Friday September 09, 2016 @02:56AM
(#12460120)
Thank you
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/Referen...