unjquerify icon indicating copy to clipboard operation
unjquerify copied to clipboard

Collection collectors are not always correct

Open devbridie opened this issue 6 years ago • 0 comments

For functions that cause mutations, the current approach of translating $("a").hide() to document.querySelectorAll("a").forEach(e => e.style.display = "none"); is possible, but functions that return values will not be transformed as expected.

Consider the following cases:

Therefore, the current forEach approach does not work for all cases.

Each transformation should be augmented with a transformation that should be used to collect the results of an application to a collection.

devbridie avatar Jun 26 '18 04:06 devbridie