umap Map and WeakMap Utility
JSON →umap (micro map) is a minimalist JavaScript utility designed to simplify common patterns when working with Map and WeakMap instances, specifically addressing the fact that their `set()` method returns the map itself rather than the value being set. This package provides a wrapper that modifies the `set()` behavior to return the *value* instead, allowing for more concise "get or set" operations, often seen in caching scenarios. It is currently at version 1.0.2 and appears to be a stable, focused utility with no apparent active development cycle beyond its initial stable release, as its purpose is singular and fulfilled. Its key differentiator is its tiny footprint and single-purpose design, providing a small but impactful quality-of-life improvement for developers frequently using Map or WeakMap for caching or memoization where an immediate return of the set value is desired.
Traffic · last 30 days ↑17% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany