mixed-map
v0.1.2
Published
A simple map implementation that prefers `WeakMap` but uses `Map` as backup for primitive keys.
Downloads
4,323
Readme
Mixed Map
A simple map implementation that prefers WeakMap
but uses Map
as backup for primitive keys.
Installation
yarn add mixed-map
# or
npm install mixed-map --save
API
export declare class MixedMap<K, V> {
has(key: K): boolean;
get(key: K): V | undefined;
set(key: K, value: V): this;
delete(key: K): boolean;
}
export default MixedMap;
License
MIT License.