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 498 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mapClearingDeleteFromSet = void 0; function mapClearingDeleteFromSet(map, key, value) { const values = map.get(key); if (values != null) { values.delete(value); if (values.size === 0) { map.delete(key); } return true; } return false; } exports.mapClearingDeleteFromSet = mapClearingDeleteFromSet; //# sourceMappingURL=map-clearing-delete-from-set.js.map