[AskJS] Is There Some Way to Lazy Evaluate Arrays in JavaScript?

This page summarizes the projects mentioned and recommended in the original post on /r/javascript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • proposal-iterator-helpers

    Methods for working with iterators in ECMAScript

  • Others have mentioned the propsed iterator helpers.

  • iter-ops

    Basic operations on iterables

  • Someone posted this recently. Maybe it'll help?

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • lazy.js

    Like Underscore, but lazier

  • FxTS

    A functional programming library for TypeScript/JavaScript

  • linqjs

    Minimalist implementation of LINQ-style extension methods for 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.

  • fromable

    A Swiss Army Knife for working with JavaScript iterables.

  • fromable - https://github.com/baron816/fromable

  • ramda

    :ram: Practical functional Javascript

  • I'm not as familiar with this but I think Ramda can do this with pipe / compose.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • IxJS

    The Interactive Extensions for JavaScript

  • There's also IxJS, which is basically RxJS but for arrays.

  • react-table

    🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table

  • true, I could memo other rows while I edit that one row, so in essence, only that one single row would be rerendered every time, but I haven't quite figured out how to do it with react-table lib.

  • mpr.kirke.dev

  • Here is a lazy implementation of map using generators as an example.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts