proposal-flatMap
proposal-array-grouping
proposal-flatMap | proposal-array-grouping | |
---|---|---|
2 | 19 | |
214 | 513 | |
- | - | |
0.0 | 0.0 | |
over 2 years ago | 7 months ago | |
HTML | HTML | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
proposal-flatMap
- SmooshGate
-
Pipeline Operator and Partial Application - Functional Programming in JavaScript
If you're doing a series of mutations specific to a custom type in that fashion, then there isn't much benefit. But imagine you want to chain operations on an existing type, whether it's a built-in like String, or a type introduced by a different package like sqlite.Database. To use method chaining you'd have to monkey-patch them, which can lead to all sorts of problems: colliding with other packages that want to monkey-patch the same types, confusing the reader when unfamiliar and seemingly undocumented methods appear (why does the SQLite documentation not mention this sqlite.Database#drop method? Which of my installed packages added that? ), your package breaking when the thing you're monkey-patching changes its API, altering object iterations, etc. The troubles with Prototype.js and MooTools in the '00s showed some of the headaches monkey-patching can lead to when it comes to JS especially, where users expect ever-changing browsers to work with 25-year-old code. (I still support changing flatten to smoosh, though.) You might subclass the existing type or encapsulate it in a new type, but then you're potentially breaking the user's typechecking, preventing the use of any other packages that want to do the same thing, escaping tree shaking, and becoming incompatible with unexpected types (what if the user already subclassed sqlite.Database themselves, and want to apply your transformation to that?).
proposal-array-grouping
-
TC39: Add Object.groupBy and Map.groupBy
Global iterator type is coming: https://github.com/tc39/proposal-iterator-helpers
But a method named `groupBy` on iterators traditionally means a different thing: https://github.com/tc39/proposal-array-grouping/issues/51#is...
Global iterable type it's too late for, since there's many extant iterables in the language and on the web which don't have it in their prototype chain and can't reasonably be changed.
-
What's New in Node.js 21
Array grouping to combine like data into groups using Object.groupBy() and Map.groupBy().
-
Updates from the 97th TC39 meeting
Array Grouping: A proposal to make grouping of array items easier.
-
Snap.js - A competitor to Lodash
They are coming out with array.group() soon, which is supposed to also fulfil the use-case of partitioning :) - https://github.com/tc39/proposal-array-grouping.
-
[AskJS] Is JavaScript missing some built-in methods?
https://github.com/tc39/proposal-array-grouping for those curious
-
Set methods proposal reaches stage 3
I'm also looking forward to map.emplace() and arr.group() and iterator helpers.
-
SmooshGate
At the end of the day, it comes down to whether browser vendors are willing to ship the feature even though it breaks said websites, and they do have visitor data to back those decisions. If the rule was "never break any website ever", you'd be able to block proposals you don't personally like by crafting a website that "gets broken" by that proposal.
At least in the array grouping proposal, they did evaluate amount and popularity of possibly breaking sites, before eventually renaming the method from .groupBy to .group
https://github.com/tc39/proposal-array-grouping/issues/37
-
New ECMAScript 23 array features
The proposal is described here.
-
how can I split an array into multiple arrays based on a property?
Remarkably, this is now a TC39 proposal.
-
Upcoming ECMAScript features I'm excited about
Proposal, Polyfill
What are some alternatives?
es1995 - ES1995 – The Missing JS Polyfill
retro-random-number
proposal-regexp-r-escape - Regular Expression `\R` Escape for ECMAScript
proposal-string-cooked - ECMAScript proposal for String.cooked built-in template tag
proposal-function-pipe-flow - A proposal to standardize helper functions for serial function application and function composition.
proposal-array-from-async - Draft specification for a proposed Array.fromAsync method in JavaScript.
proposal-iterator-helpers - Methods for working with iterators in ECMAScript
proposals - ✍️ Tracking the status of Babel's implementation of TC39 proposals (may be out of date)
just - A library of dependency-free JavaScript utilities that do just one thing.
proposal-regexp-modifiers - Regular Expression Pattern Modifiers for ECMAScript
proposal-destructuring-private - A proposal integrate private fields and destructuring