Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/Referen...



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:


Unlike izolate, I prefer your API. Great Library!


Thank you




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: