MCPcopy Create free account
hub / github.com/buke/quickjs-go / sameContext

Function sameContext

value.go:69–74  ·  view source on GitHub ↗

sameContext reports whether two values belong to the same live context.

(a *Value, b *Value)

Source from the content-addressed store, hash-verified

67
68// sameContext reports whether two values belong to the same live context.
69func sameContext(a *Value, b *Value) bool {
70 if !sameContextRef(a, b) {
71 return false
72 }
73 return a.hasValidContext() && b.hasValidContext()
74}
75
76// Equal returns true if two values are abstractly equal (JS == semantics).
77func (v *Value) Equal(other *Value) bool {

Callers 5

EqualMethod · 0.85
StrictEqualMethod · 0.85
SameValueMethod · 0.85
SameValueZeroMethod · 0.85

Calls 2

sameContextRefFunction · 0.85
hasValidContextMethod · 0.80

Tested by 1