core3-utils

npm version @wixc3/patterns on Github

Home > @wixc3/patterns

patterns package

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

Classes

Class Description
[Debouncer](/core3-utils/patterns.debouncer.html) Cancelable debouncing of calls to trigger
[Disposable\_2](/core3-utils/patterns.disposable_2.html)
[Disposables](/core3-utils/patterns.disposables.html)
[EventEmitter](/core3-utils/patterns.eventemitter.html) Basic type safe event emitter
[LRUCache](/core3-utils/patterns.lrucache.html) BASIC (not optimal) implementation of the LRU cache
[SafeDisposable](/core3-utils/patterns.safedisposable.html) Adds dispose-safe methods to Disposables: - setInterval/setTimeout - guard
[SetMultiMap](/core3-utils/patterns.setmultimap.html) Maps keys to a set of values
[Signal](/core3-utils/patterns.signal.html) Signal is a simple event emitter for one type of event.

Functions

Function Description
[createDisposables(name, initialGroups)](/core3-utils/patterns.createdisposables.html) 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)](/core3-utils/patterns.isdisposable.html)
[isSetMultiMap(x)](/core3-utils/patterns.issetmultimap.html)

Interfaces

Interface Description
[DisposalGroup](/core3-utils/patterns.disposalgroup.html)
[IDisposable](/core3-utils/patterns.idisposable.html)
[LRUCacheConfig](/core3-utils/patterns.lrucacheconfig.html)

Variables

Variable Description
[DEFAULT\_GROUP](/core3-utils/patterns.default_group.html)
[DEFAULT\_TIMEOUT](/core3-utils/patterns.default_timeout.html)

Type Aliases

Type Alias Description
[DisposableItem](/core3-utils/patterns.disposableitem.html)
[DisposableOptions](/core3-utils/patterns.disposableoptions.html)
[GroupConstraints](/core3-utils/patterns.groupconstraints.html)
[IEventEmitter](/core3-utils/patterns.ieventemitter.html)
[Listener](/core3-utils/patterns.listener.html)