UNPKG

@rimbu/multimap

Version:

An immutable Map where each key can have multiple values

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