Closed jmathew closed 2 years ago
Thanks for spotting this.
The docs are generated from the source in the main branch, the code example actually comes from the typescript source file for that method (src/cursor.ts
I think).
If you want to provide a PR, keep in mind that for legal reasons we need a signed Contributor License Agreement (CLA) before we can merge your code into the project.
You can download the form from our website: https://www.arangodb.com/documents/cla.pdf
Once you've filled out and signed it, please send it to us via e-mail: cla@arangodb.com or fax: +49-221-2722999-88.
That makes sense, thanks. WRT to the CLA, I'll leave the PR to someone already ready to contribute since this is a relatively quick PR.
This was fixed in 20c8e12.
There's a minor error in the documentation for .reduce() on https://arangodb.github.io/arangojs/7.0.0-rc.2/classes/_cursor_.arraycursor.html#reduce
In addition to the above I'd recommend updating the examples to be more apples to apples. The examples are supporting the note "Most complex uses of the reduce method can be replaced with simpler code using ArrayCursor.forEach or the for await syntax." That suggests the example should highlight only the additional complexity introduced by .reduce. The example adds complexity to the .reduce example by introducing an unnecessary ternary as well. To make it more equivalent:
I can make this update in a PR if there's some documentation somewhere on how to update the documentation. Seems I'd need to make a PR to the gh-pages branch with changes made in the devel folder. I think there's some syntax highlighting tool that I'm missing for updating the example code though. Is there some documentation on updating the documentation?