News for hackers. Stuff that matters.
Re:Riak JS Lib, with implementations for Node.js & jQuery by CytokineStorm on Friday July 23, 2010 @07:36PM (#1542707)
db.get('flights', 'KLM-5034')(function(flight, meta) { ... });

Is this a typo? Shouldn't it be:

db.get('flights', 'KLM-5034', function(flight, meta) { ... });

Re:Riak JS Lib, with implementations for Node.js & jQuery by technoweenie on Friday July 23, 2010 @07:53PM (#1542731)
No, db.get() returns an anonymous function that takes a callback. The advantage to this type of api vs the one you mentioned, is db.get() can get more or fewer arguments, and callback is always last.

db.get() is a bad example, I'm not sure why you'd want to pass anything other than bucket/key to get an object. In this exact case, I imagine it's just for consistency with the rest of the API.