Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cache_mapset/utils.ts>BaseMap

Maps and Sets with cache replacement policies, TC39 proposal-policy-map-set implementation
Latest
class BaseMap
implements MapLike<K, V>
Abstract
import { BaseMap } from "https://deno.land/x/cache_mapset@1.0.0/utils.ts";

Constructors

new
BaseMap(capacity: number)

Properties

protected
readonly
cache: Readonly<Map<K, V>>
protected
readonly
capacity: number
readonly
size: number

Methods

clear(): void
delete(key: K): boolean
abstract
get(key: K): V | undefined
has(key: K): boolean
abstract
set(key: K, value: V): this