linqjs
proposal-iterator-helpers
linqjs | proposal-iterator-helpers | |
---|---|---|
2 | 43 | |
15 | 1,325 | |
- | - | |
0.0 | 4.8 | |
about 3 years ago | 5 months ago | |
JavaScript | 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.
linqjs
-
[AskJS] Is There Some Way to Lazy Evaluate Arrays in JavaScript?
This is what LINQ does in C#. Many have made js implementations; here's my attempt. Imo the real inefficiency of map/filter is that it allocates a new array for each step.
-
I'm a full-stack dev who often wishes they had LINQ available when working in the frontend, so I ported LINQ to JavaScript.
I made a JS port of the LINQ extension methods using the generator function feature of ES6: github, npm. It works pretty much exactly like LINQ in C# does, just with camelCase for the method names.
proposal-iterator-helpers
-
A comprehensive guide to JavaScript generators
However, this limitation won’t last forever. With Iteration Helpers proposed for the next version of ECMAScript (currently Stage 4), you’ll eventually be able to do things like limiting or transforming generator output natively — similar to what RxJS already does for observables.
-
Cash: A small jQuery alternative for modern browsers
The versions of those methods that support any iterator (including upgrading NodeList "for free") have passed Stage 4 of the process, which means they will be in the next version of the standard and already starting to show up in some browsers.
https://github.com/tc39/proposal-iterator-helpers
- TC39 Proposal: Iterator Helpers
-
Updates from the 104th TC39 meeting
Sync Iterator Helpers: Extends iterators with helper methods to improve their usability in synchronous contexts.
-
I was wrong about array methods and generators...
In fact, the developer experience around iteration utilities is so great that there is an active Stage 3 ECMAScript proposal right now (as of writing) that aims to officially add lazy iterator helpers to the language. When this is more widely supported, expect a follow-up article to this one that investigates the would-be C++-backed helpers.
-
JavaScript weakmaps should be iterable
Many of these are at stage 3 of the standardization process and have a good chance of shipping soon: https://github.com/tc39/proposal-iterator-helpers
(They're not on objects, which I think is probably for the best; every method on Object.prototype is a shadowing risk and so we're unlikely to see any besides the ones that already exist. You can always use Object.entries; if your object has so many dynamically-computed properties that eagerly collecting them is a performance concern, then it should probably be a Map.)
-
More Itertools
Shout out to JavaScript massively delaying https://github.com/tc39/proposal-async-iterator-helpers in the 23rd hour.
The proposal seemed very close to getting shipped alongside https://github.com/tc39/proposal-iterator-helpers while basically accepting many of the constraints of current async iteration (one at a time consumption). But the folks really accepted that concurrency needs had evolved, decided to hold back & keep iterating & churning for better.
I feel like a lot of the easy visible mood on the web (against the web) is that there's too much, that stuff is just piled in. But I see a lot of caring & deliberation & trying to get shit right & good. Sometimes that too can be maddening, but ultimately with the web there aren't really re-do-es & the deliberation is good.
-
What's New in Node.js 22
Support for new JavaScript features, including Array.fromAsync(), Set methods, and Iterator helpers.
-
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.
-
Lodash just declared issue bankruptcy and closed every issue and open PR
Very much agreed. The amount of mileage we get from using Spread (literally the ...) alone has been amazing. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Iteration helpers is shipping soon, that'll be a huge help (async iteration helpers will be delayed for a while). https://github.com/tc39/proposal-iterator-helpers .
In the olden days, I feel like the codebases I worked on needed to use .apply() multiple times a week, to figure out some creative way of invoking functions. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... That's all gone now; I'd take even odds that 50% of my team knows .call and .apply.
Chrome 117 is shipping Object.groupBy() and that's gonna be a huge help in eliminating a lot of the last places we end up using lodash. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
What are some alternatives?
IxJS - The Interactive Extensions for JavaScript
EventSource - a polyfill for http://www.w3.org/TR/eventsource/
mpr.kirke.dev
proposal-function-helpers - A withdrawn proposal for standardizing some useful, popular helper functions into JavaScript’s Function object.
fromable - A Swiss Army Knife for working with JavaScript iterables.