Where are the directions for submitting a pull req...
# lucee
d
Where are the directions for submitting a pull request for document changes? I noticed the array.some() documentation incorrectly says:
Copy code
...given closure/function with every element...
It actually should say something like:
Copy code
This function calls a given closure/function and returns true if any of the values cause the closure call to return true. The logic is short-circuited, so the first truthy match will stop processing more elements. If all elements fail the closure call, then false is returned.
Not sure that that's the best wording, but the docs should definitely clarify that the logic is short-circuited, because the way it's written now it states every element is tested.
a
Especially given that's the whole thing about the
some
function.
👍 1
The docs for
every
are - likewise - missing the point. https://docs.lucee.org/reference/objects/array/every.html
(CF's docs at least aren't actively wrong, but they also miss this important point - https://helpx.adobe.com/uk/coldfusion/cfml-reference/coldfusion-functions/functions-a-b/arrayevery.html) cfdocs likewise: https://cfdocs.org/arrayevery
z
As it looks like the description hasn't been modified on Lucee docs, best approach would be to file a quick PR against the function definition https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/resource/fld/core-base.fld#L13081 Once a definition has been modified on docs, it needs to be manually changed in both places, nobody has got around to putting a round tripping process back to the lucee core in place yet, but from the looks of things, it hasn't be modified
d
@zackster, Thanks. I've filed a PR: https://github.com/dswitzer/Lucee/pull/3
I believe I got all of the "some" functionality updated.
I ended up using this as the template:
Copy code
This function calls a given closure/function and returns true if any of the values in a given array cause the closure call to return true. The logic is short-circuited, so the first truthy match will stop processing more items. If all items fail the closure call, then false is returned.