memcachier / memjs

A memcache client for node using the binary protocol and SASL authentication
MIT License
197 stars 52 forks source link

Switch to new argument scheme with options dictionary #87

Closed dterei closed 8 years ago

dterei commented 8 years ago

We now declare methods generally as:

    function(key, value, options, callback)

Rather than adding each argument (generally unused) as trailing arguments after callback. Callback is always the last argument now.

To handle backwards compatability, we check the type of options and if it is a function, we treat arguments as corresponding to the old interface but issue a depreceated warning.

This fixes issue #53 and #50, making CAS also easier to support going forward.

leohihimax commented 8 years ago

when will this pr be merged ? @alevy @dterei

dterei commented 8 years ago

@alevy rebased so should be good to merge