Don't let TC39 use smoosh or smooshMap
github.com
github.com
Why do I not want TC39 to use smoosh or smooshMap?
`smoosh` is a perfectly fine and delightful method name, TBH.
Blame the authors of the frameworks that force js into a terrible corner
There's a current TC39 proposal [2] (at Stage 3, which is the discovery stage to gauge feasibility in browsers) to add officially to the language standard `Array.prototype.flatten()` (to flatten an array like `[[1, 2], 3, [4, 5]]` to `[1, 2, 3, 4, 5]`) and `Array.prototype.flatMap` (to `flatten().map()` as a single operation).
Because browser vendors discovered some libraries in the wild (8+ year old versions of MooTools) install their own incompatible to the new spec version of `Array.prototype.flatten` that does something different from the array flattening above, there is a discussion (as PR) [3] to avoid breaking ancient websites by choosing a new name for the proposed `Array.prototype.flatten`, in the case of the PR `Array.prototype.smoosh`. (For consistency it then renames `Array.prototype.flatMap` to `Array.prototype.smooshMap`.)
Other names are being discussed as well in the PR, and the TC39 committee has not yet actually met on the subject at this time, so nothing is quite set in stone.
[1] https://github.com/tc39 [2] https://tc39.github.io/proposal-flatMap/ [3] https://github.com/tc39/proposal-flatMap/pull/56