setMapSize = (map, size) => {
	let i = 0;
	for (const item of map.keys()) {
		if (i++ >= size) {
			map.delete(item);
		}
	}
}
@template K, X
@param {Map<K, X>} map map
@param {number} size count of items to keep