2019-10-17 14:08:05 -04:00
|
|
|
/**
|
|
|
|
* Checks if the first argument is a subset of the second argument.
|
|
|
|
* @param {Set} subset The set to be considered as the subset.
|
|
|
|
* @param {Set} superset The set to be considered as the superset.
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
export const isSubset = (subset, superset) =>
|
2020-12-23 19:10:25 -05:00
|
|
|
Array.from(subset).every((value) => superset.has(value));
|