How to use the mnemonist/set.intersectionSize function in mnemonist

To help you get started, we’ve selected a few mnemonist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hashicorp / consul / ui / packages / consul-ui / app / filter / predicates / service-instance.js View on Github external
source: (item, values) => {
    return setHelpers.intersectionSize(values, new Set(item.ExternalSources || [])) !== 0;
  },
};
github hashicorp / consul / ui / packages / consul-ui / app / filter / predicates / service.js View on Github external
source: (item, values) => {
    return setHelpers.intersectionSize(values, new Set(item.ExternalSources || [])) !== 0;
  },
};
github hashicorp / consul / ui / packages / consul-ui / app / filter / predicates / policy.js View on Github external
datacenter: (item, values) => {
    return (
      typeof item.Datacenters === 'undefined' ||
      setHelpers.intersectionSize(values, new Set(item.Datacenters)) > 0
    );
  },
};
github hashicorp / consul / ui-v2 / app / filter / predicates / service.js View on Github external
return true;
      }
      if (typeIncludes['in-mesh']) {
        if (item.InMesh) {
          return true;
        }
      }
      if (typeIncludes['not-in-mesh']) {
        if (!item.InMesh) {
          return true;
        }
      }
      return false;
    }
    if (sources.length > 0) {
      if (setHelpers.intersectionSize(uniqueSources, new Set(item.ExternalSources || [])) !== 0) {
        return true;
      }
      return false;
    }
    return true;
  };
};

mnemonist

Curated collection of data structures for the JavaScript/TypeScript.

MIT
Latest version published 11 months ago

Package Health Score

76 / 100
Full package analysis