MCPcopy
hub / github.com/vitest-dev/vitest / isAsymmetric

Function isAsymmetric

packages/expect/src/jest-utils.ts:43–50  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

41const functionToString = Function.prototype.toString
42
43export function isAsymmetric(obj: any): obj is AsymmetricMatcher<any> {
44 return (
45 !!obj
46 && typeof obj === 'object'
47 && 'asymmetricMatch' in obj
48 && isA('Function', obj.asymmetricMatch)
49 )
50}
51
52export function hasAsymmetric(obj: any, seen: Set<any> = new Set()): boolean {
53 if (seen.has(obj)) {

Callers 2

hasAsymmetricFunction · 0.85
asymmetricMatchFunction · 0.85

Calls 1

isAFunction · 0.85

Tested by

no test coverage detected