[![npm version](https://badge.fury.io/js/@wixc3%2Fpatterns.svg)](https://badge.fury.io/js/@wixc3%2Fpatterns)
[@wixc3/patterns on Github](https://github.com/dazl-dev/core3-utils/tree/main/packages/patterns)

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](https://dazl-dev.github.io/core3-utils/index) &gt; [@wixc3/patterns](https://dazl-dev.github.io/core3-utils/patterns)

## patterns package

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

## Classes

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

## Functions

| Function                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [createDisposables(name, initialGroups)](https://dazl-dev.github.io/core3-utils/patterns.createdisposables) | <p>Disposables allow adding of disposal async functions, when dispose is called, these functions will be run sequentially</p><p>Disposal groups: You can set disposal groups with constraints (before, after) to ensure that disposal groups are disposed in the correct order</p><p>within each group disposables are disposed in the reverse order they were added</p> |
| [isDisposable(value)](https://dazl-dev.github.io/core3-utils/patterns.isdisposable)                         |                                                                                                                                                                                                                                                                                                                                                                          |
| [isSetMultiMap(x)](https://dazl-dev.github.io/core3-utils/patterns.issetmultimap)                           |                                                                                                                                                                                                                                                                                                                                                                          |

## Interfaces

| Interface                                                                           | Description |
| ----------------------------------------------------------------------------------- | ----------- |
| [DisposalGroup](https://dazl-dev.github.io/core3-utils/patterns.disposalgroup)   |             |
| [IDisposable](https://dazl-dev.github.io/core3-utils/patterns.idisposable)       |             |
| [LRUCacheConfig](https://dazl-dev.github.io/core3-utils/patterns.lrucacheconfig) |             |

## Variables

| Variable                                                                              | Description |
| ------------------------------------------------------------------------------------- | ----------- |
| [DEFAULT_GROUP](https://dazl-dev.github.io/core3-utils/patterns.default_group)     |             |
| [DEFAULT_TIMEOUT](https://dazl-dev.github.io/core3-utils/patterns.default_timeout) |             |

## Type Aliases

| Type Alias                                                                                | Description |
| ----------------------------------------------------------------------------------------- | ----------- |
| [DisposableItem](https://dazl-dev.github.io/core3-utils/patterns.disposableitem)       |             |
| [DisposableOptions](https://dazl-dev.github.io/core3-utils/patterns.disposableoptions) |             |
| [GroupConstraints](https://dazl-dev.github.io/core3-utils/patterns.groupconstraints)   |             |
| [IEventEmitter](https://dazl-dev.github.io/core3-utils/patterns.ieventemitter)         |             |
| [Listener](https://dazl-dev.github.io/core3-utils/patterns.listener)                   |             |
