Make cursor.map/forEach follow the ECMAScript APIs #63
…MAScript Array.forEach and Array.map functions. Their callbacks now both have optional index and traversal object parameters.
I think this is a good idea, with some changes.
1: The API should follow the full ECMA 5 spec for
2: The same API should be on the server, as implemented in
3: Tests for client and server APIs. (
@debergalis Sorry I was unclear...
But it seems to be quite fundamental in Coffeescript to protect you from accidentally creating global variables (see http://coffeescript.org/#lexical_scope). As far as I know, the "bare" option is mainly aimed at e.g. Node's module loader, that provides it own wrapper anyway.
@iwoj: It might help a lot if you were to do the changes again against the current devel branch (not against master), this way you can squash the few amount of changes you have into a single commit as well as making it easier for them to pull in. So, in short:
@debergalis: Why did you refer to those two issues, was that by accident? I don't see how they are relevant.
Fixes #63. Based on iwoj's PR. Needs tests and docs.