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

x/ayonli_jsext/collections/CiMap.ts>default

A JavaScript extension package for building strong and modern applications.
Latest
class default
extends Map<K, any>
import { default } from "https://deno.land/x/ayonli_jsext@v0.9.72/collections/CiMap.ts";

Case-insensitive map, keys are case-insensitive.

Examples

Example 1

import { CiMap } from "@ayonli/jsext/collections";

const map = new CiMap<string, string>();

map.set("foo", "hello");
map.set("bar", "world");

console.log(map.get("FOO")); // hello
console.log(map.has("BAR")); // true

Constructors

new
default(iterable?: Iterable<readonly [K, V]> | null)

Type Parameters

K extends string
V

Properties

readonly
[Symbol.toStringTag]: "CiMap"

Methods

delete(key: K): boolean
entries(): IterableIterator<[K, V]>
forEach(callbackfn: (
value: V,
key: K,
map: Map<K, V>,
) => void
, thisArg?: any
): void
get(key: K): V | undefined
has(key: K): boolean
keys(): IterableIterator<K>
set(key: K, value: V): this
values(): IterableIterator<V>
[Symbol.iterator](): IterableIterator<[K, V]>