Hacker Newsnew | past | comments | ask | show | jobs | submit | ImDelicious's commentslogin

I find the batch operations odd odd:

1. why have a different method for multiple values rather then check parameter type for the normal methods (e.g. if 'set' received an object or get received an array).

2. getMany returns an array instead of an object mapping key to value. Sure may be more efficient but less convenient to use.


Hmm. Good points. 1) I made them different operations just for clarity - however, it would make the API a little nicer if they were the same. 2) I agree with this - an object mapping would probably be easier.

Pull requests, issues etc. all welcome. Otherwise, I'll have a look at it myself.


Agree with 1). Might be a matter of taste, but jQuery does this as well with many methods (e.g. $.on).


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

Search: