Why I Like Using Maps (and WeakMaps) for Handling DOM Nodes

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • kholsa-lap

    A solver for a weighted bipartite matching problem best suited for asymmetrical k-regular sparse graphs.

  • The actual code that finds the most efficient combination of jobs to users I have on github. But there's at least 3 bugs with I fixed and just never updated. It uses an adjacency matrix for it's graph though.

  • stream-video-js

    GetStream JavaScript Video SDK

  • I had to write a wrapper around IntersectionObserver where each observed element would register its own handler which would be stored in a Map where key would be the registering DOM element and triggered when IO callback with entries would include affected DOM element (matching through entry.target), nothing fancy but makes working with it a tiny bit easier. I like maps and reading about this made me realize that I might be able to switch to WeakMap to handle improper cleanups.

  • 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
  • proposal-set-methods

    Proposal for new Set methods in JS

  • proposal-iterator-helpers

    Methods for working with iterators in ECMAScript

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