@nesvet/n
Version:
Various utilities
15 lines • 444 B
JavaScript
/* eslint-disable @typescript-eslint/no-explicit-any */
export function getAll(map, keys, onlyExisting = false) {
const items = [];
if (onlyExisting)
for (const key of keys) {
const item = map.get(key);
if (item !== undefined)
items.push(item);
}
else
for (const key of keys)
items.push(map.get(key));
return items;
}
//# sourceMappingURL=getAll.js.map