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

x/ayonli_jsext/collections/index.ts>CiMap

A JavaScript extension package for building strong and modern applications.
Latest
class CiMap
extends Map<K, any>
Re-export
import { CiMap } from "https://deno.land/x/ayonli_jsext@v0.9.72/collections/index.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
CiMap(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]>