2019-12-21 20:55:43 +05:30
|
|
|
/**
|
|
|
|
* 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) =>
|
2021-03-08 18:12:59 +05:30
|
|
|
Array.from(subset).every((value) => superset.has(value));
|