Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cleanup-util

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleanup-util - npm Package Compare versions

Comparing version 0.1.1-tsreboot.d6a3847 to 1.0.0

2

package.json
{
"name": "cleanup-util",
"version": "0.1.1-tsreboot.d6a3847",
"version": "1.0.0",
"description": "A utility for cleaning up event handlers in nodejs.",

@@ -5,0 +5,0 @@ "module": "./dist/esm/index.js",

# cleanup-util · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/flitbit/cleanup-util/blob/master/LICENSE)
> Utility for cleaning up event handlers
**cleanup-util** is a small, utility for tracking and cleaning up event handlers. I find this utility useful when I have classes derived from EventHandler that are used throughout the life of my applications and those EventHandlers frequently have event handlers added and removed. It helps me catch memory leaks from dangling event listeners early in the development process. I hope you find it useful.
**cleanup-util** is a small, utility for tracking and cleaning up event handlers. I find this utility useful when I have classes derived from EventHandler that are used throughout the life of my applications and those EventHandlers frequently have event handlers added and removed. It helps me catch memory leaks from dangling event listeners early in the development process. I hope you find it useful.

@@ -26,4 +27,4 @@ ## Installing / Getting started

target: EventEmitter,
reciprocal?: string
): void
reciprocal?: string,
): void;
```

@@ -38,3 +39,7 @@

```ts
function addCleanupTask<S extends EventEmitter, T>(sender: S, target: T, task: Task): void
function addCleanupTask<S extends EventEmitter, T>(
sender: S,
target: T,
task: Task,
): void;
```

@@ -58,3 +63,3 @@

Tests are built using [Mocha](https://mochajs.org/) and chai.
Tests are built using [Jest](https://jestjs.io/); we're near 100%!

@@ -61,0 +66,0 @@ ```shell

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc