Preparing for system design interviews?  Try bugzed.com →

gc-hook: Simplified FinalizationRegistry

JSON →
library 0.4.1 ·javascript maintenance
verified Jun 17, 2026

gc-hook is a utility library that simplifies the use of JavaScript's `FinalizationRegistry` for managing object lifecycle and reacting to garbage collection. The current stable version is 0.4.1, with the last publish being a year ago, suggesting a mature but not rapidly evolving codebase. It differentiates itself by addressing common pitfalls associated with `FinalizationRegistry`, such as preventing accidental leaks of the registered reference, allowing flexible proxy overrides, and providing mechanisms for explicit deregistration via held references or tokens. Its primary goal is to abstract away the complex specifics of `FinalizationRegistry`, enabling developers to focus on application logic rather than the intricacies of memory management. It works in both CommonJS and ES module environments, offering broad compatibility.

total hits 17
actors 5 distinct systems
last hit 17d ago AhrefsBot
GPTBot
4
ByteDance
3
Script
1
Humans
4

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France