Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@dazl/patterns

Package Overview
Dependencies
Maintainers
33
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dazl/patterns

Useful data structures such as LRU-Cache, set-multi-map, Signal, EventEmitter, Disposable, Debouncer

latest
Source
npmnpm
Version
18.5.1
Version published
Maintainers
33
Created
Source

npm version @dazl/patterns on Github

Home > @dazl/patterns

patterns package

Useful data structures such as LRU-Cache, set-multi-map, Signal, EventEmitter, Disposable, Debouncer

Classes

ClassDescription
DebouncerCancelable debouncing of calls to trigger
Disposable_2
Disposables
EventEmitterBasic type safe event emitter
LRUCacheBASIC (not optimal) implementation of the LRU cache
SafeDisposable

Adds dispose-safe methods to Disposables:

- setInterval/setTimeout - guard

SetMultiMapMaps keys to a set of values
SignalSignal is a simple event emitter for one type of event.

Functions

FunctionDescription
createDisposables(name, initialGroups)

Disposables allow adding of disposal async functions, when dispose is called, these functions will be run sequentially

Disposal groups: You can set disposal groups with constraints (before, after) to ensure that disposal groups are disposed in the correct order

within each group disposables are disposed in the reverse order they were added

isDisposable(value)
isSetMultiMap(x)

Interfaces

InterfaceDescription
DisposalGroup
IDisposable
LRUCacheConfig

Variables

VariableDescription
DEFAULT_GROUP
DEFAULT_TIMEOUT

Type Aliases

Type AliasDescription
DisposableItem
DisposableOptions
GroupConstraints
IEventEmitter
Listener

FAQs

Package last updated on 14 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts