4 ms·
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'
by ImDelicious 15y ago
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.
- huskyr 15y agoAgree with 1). Might be a matter of taste, but jQuery does this as well with many methods (e.g. $.on).
- d0ugal 15y agoHmm. 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.