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

    Function equals

    • Returns true if both flag boxes have identical bits AND belong to the same registry instance. Boxes from different registry instances are never equal, even when their bits are identical.

      Type Parameters

      • TFlags extends string
      • TBit extends Bit
      • TBrand extends string | symbol

      Parameters

      Returns boolean

      const a = registry.of("read", "write");
      const b = registry.of("read", "write");
      equals(a, b); // true

      const other = NumberFlagRegistry.from("read", "write");
      equals(a, other.of("read", "write")); // false — different registry instance