UNPKG

@rimbu/multimap

Version:

An immutable Map where each key can have multiple values

21 lines 994 B
import { HashMap } from '@rimbu/hashed/map'; import { SortedSet } from '@rimbu/sorted/set'; import { MultiMapContext, } from '@rimbu/multimap/custom'; function createContext(options) { return Object.freeze(new MultiMapContext('HashMultiMapSortedValue', options?.keyMapContext ?? HashMap.defaultContext(), options?.keyMapValuesContext ?? SortedSet.defaultContext())); } const _defaultContext = createContext(); /** * The default `HashMultiMapSortedValue` creators and context. * * Use this exported value to create and work with immutable `HashMultiMapSortedValue` instances. * See the [MultiMap documentation](https://rimbu.org/docs/collections/multimap) and the [HashMultiMapSortedValue API documentation](https://rimbu.org/api/rimbu/multimap/HashMultiMapSortedValue/interface). */ export const HashMultiMapSortedValue = Object.freeze({ ..._defaultContext, createContext, defaultContext() { return _defaultContext; }, }); //# sourceMappingURL=interface.mjs.map