Welcome to mirror list, hosted at ThFree Co, Russian Federation.

set.js « utils « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3845d648b61f45f72c49d72880fad343b9111fbd (plain)
1
2
3
4
5
6
7
8
9
/**
 * 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}
 */
// eslint-disable-next-line import/prefer-default-export
export const isSubset = (subset, superset) =>
  Array.from(subset).every(value => superset.has(value));