Standard built-ins
FinalizationRegistry.prototype.unregister()
Remove registrations matching a supplied eligible token; report whether at least one was removed.
Formal Syntax & Structure
javascript syntaxjavascript
finalizationRegistry.unregister(unregisterToken)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| unregisterToken | Object | nonregistered Symbol | Token supplied to register. |
Return Value
Boolean
Whether the stated condition holds.
Working Example
Example Snippetjavascript
const r=new FinalizationRegistry(()=>{}),k={},t={};r.register(k,1,t);console.log(r.unregister(t),r.unregister(t));