@nevware21/tripwire - v0.1.8
    Preparing search index...

    Function deepKeysOp

    Export operator functions

    • Creates a keys operation that uses deep equality for key comparison. This function automatically determines whether to use any or all based on the assertion context. Used when accessing the .deep.keys() chain without explicit any/all specification.

      Type Parameters

      • R

      Parameters

      Returns IKeysOp<R>

      A IKeysOp operation configured for either any or all matching based on context.

      The operation checks the assertion context to determine behavior:

      This allows natural assertion syntax like:

      • expect(map).to.have.deep.keys([...]) → defaults to "all"
      • expect(map).to.have.any.deep.keys([...]) → uses "any"
      // Without explicit any/all - defaults to "all"
      const map = new Map([[{ id: 1 }, 'val1'], [{ id: 2 }, 'val2']]);
      expect(map).to.have.deep.keys([{ id: 1 }, { id: 2 }]); // Uses allDeepKeyFilterOp

      // With explicit any - uses anyDeepKeyFilterOp
      expect(map).to.have.any.deep.keys([{ id: 1 }, { id: 99 }]); // Passes