SmartCollections
npm install @bikky/smart-collectionsextends Array
extends Map
extends Map
A map where each value is stored in a set, provides shortcuts
for common operations on the values.
* push(key, value)
* remove(key, value)
* includes(key, value)
$3
#### WaitableMap roughly implements Map
Keeps track of all get requests as pending promises which are
resolved when the value is set.
#### ExpireMap implements Map
A map that expires values after a certain amount of time.
Provides events for when values are added or expires.
$3
#### WeakArray implements Array
An array whose values are weak so that they can be garbage
collected if they're not held elsewhere. Automatically handles
releasing their pointers as they are garbage collected.
Future: Provide events for when values are added or are garbage collected.
#### WeakRefMap implements Map
A map whose values are weak so that they can be garbage collected
if they're not held elsewhere. Automatically handles releasing
their pointers as they are garbage collected.
Called WeakRefMap because WeakMap is already taken but refers to
when the keys are weak pointers, not the values.
$3
#### Map2D extends Map
Stores a two-dimensional map of keys and values. Contains the
following bonus methods:
* has2D(key, key, value) - looks up if the value exists in the 2D map
* set2D(key, key, value) - sets the value in the 2D map
* get2D(key, key, value) - retrieves the value in the 2D map
#### Treemap roughly implements Map
Treemap keeps track of keys and values as Nodes in a tree. Parent
nodes can have multiple children, children may only have one parent.
$3
#### VersionMap original
VersionMap keeps track of a tree of inheritance values allowing
for values set in later versions to override the values of
earlier versions.
Uses a TreeMap as a controller to create the hierarchy.
#### MetadataCache original
Stores metadata about a set of objects. Metadata is not stored
on the object itself.
#### InheritableMetastore original`