cujojs / when

A solid, fast Promises/A+ and when() implementation, plus other async goodies.
Other
3.44k stars 396 forks source link

Update API doc: Add simple table for choosing a lift function #339

Closed adamloving closed 10 years ago

adamloving commented 10 years ago

I added a table to simplify choosing a lift function.

briancavalier commented 10 years ago

@adamloving Thanks, this is a great idea! I really like it.

Just a couple suggestions/questions:

  1. How about making the left-most column bold as well, to call them out as "headings".
  2. I've been trying to start promoting when.lift over when/function's lift. It'd be nice if we could tweak the table to mention or favor when.lift over `when/function.lift``
  3. What do you think about showing the return value in the last row (the row that currently shows the code for calling the appropriate lift function)? Might make things too crowded, but let me know what you think.
adamloving commented 10 years ago

@briancavalier I like 1, and 2 (and made the changes). My change to address 3 caused unfortunate wrapping. Simpler (shorter) may be better. What do you think?

briancavalier commented 10 years ago

Looks great. I think your solution of adding .then(...) works well. Thanks again for adding this!