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 354 B
/** * @public * Does not check value equality, only key. Takes items from A. * * See {@link mapIntersect}. */ export function mapIntersect(a, b) { const result = new Map(); a.forEach((item, key) => { if (b.has(key)) { result.set(key, item); } }); return result; } //# sourceMappingURL=map-intersect.js.map