bitwise-flag - v2.1.0
    Preparing search index...

    Function overlaps

    • Returns true if the two flag boxes have at least one flag in common.

      Type Parameters

      • TFlags extends string
      • TBit extends Bit

      Parameters

      Returns boolean

      if boxes belong to different registry instances.

      const a = registry.of("read", "write");
      const b = registry.of("write", "execute");
      overlaps(a, b); // true — "write" is shared
      overlaps(a, registry.of("admin")); // false — no common flags