dominictarr/cradle-init — comment on commit 0c837d99dd8e551e29c8c20b454118edb8b3f1e7
File:  line 0
By dominictarr:

it was because cradle overwrites forEach on the returned data.

I once spent several hours trying to figure out why data.rows.forEach(... wasn't working. it was hugely frustrating, because of course, I expected forEach to work differently.

it's _really really bad_ to overwrite language idioms like that, because it's got to be very clearly documented.

you should plan documentation as you code, and, if possible make your thing work just like how something else already works.

then you can just say "this function takes the same arguments as mikeal/request" and then every one can just read the request documentation.

(documentation reuse, as well as code reuse!)

where as breaking normal behaviour needs twice as much documentation, because you have to say "forEach" is special here.

that said, I don't actually use this package any more...