Skip to content

CaseInsensitiveMap

Defined in: packages/core/src/map/case-insensitive-map.ts:8

A case-insensitive Map.

Keys that are strings are treated in a case-insensitive manner: lookups are O(1) via an internal lowercase-to-original-key index, and keys()/ entries()/iteration still yield the original casing as first inserted.

  • Map<T, U>

T

U

new CaseInsensitiveMap<T, U>(entries?): CaseInsensitiveMap<T, U>

Defined in: packages/core/src/map/case-insensitive-map.ts:12

Iterable<readonly [T, U], any, any> | null

CaseInsensitiveMap<T, U>

Map<T, U>.constructor

readonly [toStringTag]: string

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.symbol.wellknown.d.ts:135

Map.[toStringTag]


readonly size: number

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.collection.d.ts:46

the number of elements in the Map.

Map.size


readonly static [species]: MapConstructor

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.symbol.wellknown.d.ts:317

Map.[species]

[iterator](): MapIterator<[T, U]>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:141

Returns an iterable of entries in the map.

MapIterator<[T, U]>

Map.[iterator]


clear(): void

Defined in: packages/core/src/map/case-insensitive-map.ts:72

Removes all elements from the Map.

void

Map.clear


delete(key): boolean

Defined in: packages/core/src/map/case-insensitive-map.ts:56

T

boolean

true if an element in the Map existed and has been removed, or false if the element does not exist.

Map.delete


entries(): MapIterator<[T, U]>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:146

Returns an iterable of key, value pairs for every entry in the map.

MapIterator<[T, U]>

Map.entries


forEach(callbackfn, thisArg?): void

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.collection.d.ts:29

Executes a provided function once per each key/value pair in the Map, in insertion order.

(value, key, map) => void

any

void

Map.forEach


get(key): U | undefined

Defined in: packages/core/src/map/case-insensitive-map.ts:39

Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

T

U | undefined

Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

Map.get


getOrInsert(key, defaultValue): U

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.esnext.collection.d.ts:25

Returns a specified element from the Map object. If no element is associated with the specified key, a new element with the value defaultValue will be inserted into the Map and returned.

T

U

U

The element associated with the specified key, which will be defaultValue if no element previously existed.

Map.getOrInsert


getOrInsertComputed(key, callback): U

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.esnext.collection.d.ts:31

Returns a specified element from the Map object. If no element is associated with the specified key, the result of passing the specified key to the callback function will be inserted into the Map and returned.

T

(key) => U

U

The element associated with the specific key, which will be the newly computed value if no element previously existed.

Map.getOrInsertComputed


has(key): boolean

Defined in: packages/core/src/map/case-insensitive-map.ts:48

T

boolean

boolean indicating whether an element with the specified key exists or not.

Map.has


keys(): MapIterator<T>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:151

Returns an iterable of keys in the map

MapIterator<T>

Map.keys


set(key, value): this

Defined in: packages/core/src/map/case-insensitive-map.ts:24

Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

T

U

this

Map.set


values(): MapIterator<U>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:156

Returns an iterable of values in the map

MapIterator<U>

Map.values


static groupBy<K, T>(items, keySelector): Map<K, T[]>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2024.collection.d.ts:23

Groups members of an iterable according to the return value of the passed callback.

K

T

Iterable<T>

An iterable.

(item, index) => K

A callback which will be invoked for each item in items.

Map<K, T[]>

Map.groupBy