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.
The assert scope.
A IKeysOp operation configured for either any or all matching based on context.
The operation checks the assertion context to determine behavior:
ANY context flag is set → uses anyDeepKeyFilterOp (at least one key must match)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
Export operator functions