@wixc3/patterns v17.1.1
patterns package
Useful data structures such as LRU-Cache, set-multi-map, Signal, EventEmitter, Disposable, Debouncer
Classes
Class | Description |
---|---|
Debouncer | Cancelable debouncing of calls to trigger |
Disposable_2 | |
Disposables | |
EventEmitter | Basic type safe event emitter |
LRUCache | BASIC (not optimal) implementation of the LRU cache |
SafeDisposable | Adds dispose-safe methods to Disposables:- setInterval/setTimeout - guard |
SetMultiMap | Maps keys to a set of values |
Signal | Signal is a simple event emitter for one type of event. |
Functions
Function | Description |
---|---|
createDisposables(name, initialGroups) | Disposables allow adding of disposal async functions, when dispose is called, these functions will be run sequentiallyDisposal groups: You can set disposal groups with constraints (before, after) to ensure that disposal groups are disposed in the correct orderwithin each group disposables are disposed in the reverse order they were added |
isDisposable(value) | |
isSetMultiMap(x) |
Interfaces
Interface | Description |
---|---|
DisposalGroup | |
IDisposable | |
LRUCacheConfig |
Variables
Variable | Description |
---|---|
DEFAULT_GROUP | |
DEFAULT_TIMEOUT |
Type Aliases
Type Alias | Description |
---|---|
DisposableItem | |
DisposableOptions | |
GroupConstraints | |
IEventEmitter | |
Listener |
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
9 months ago
8 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago