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