cleanup-util
Advanced tools
Comparing version 0.1.1-tsreboot.d6a3847 to 1.0.0
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
70
0