UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

16 lines 417 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mapAddToSet = void 0; function mapAddToSet(map, key, value) { const values = map.get(key); if (values != null) { values.add(value); } else { const set = new Set(); set.add(value); map.set(key, set); } } exports.mapAddToSet = mapAddToSet; //# sourceMappingURL=map-add-to-set.js.map