UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

18 lines (15 loc) 371 B
/** * Remove all elements of B from A. * This operation mutates A * @template T * @param {Set<T>} from * @param {Set<T>} to_be_removed */ export function set_remove(from, to_be_removed) { const bs = Array.from(to_be_removed); const n = bs.length; for (let i = 0; i < n; i++) { const t = bs[i]; from.delete(t); } }