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

Method SameValue

value.go:93–98  ·  view source on GitHub ↗

SameValue returns true if two values are the same according to JS SameValue.

(other *Value)

Source from the content-addressed store, hash-verified

91
92// SameValue returns true if two values are the same according to JS SameValue.
93func (v *Value) SameValue(other *Value) bool {
94 if !sameContext(v, other) {
95 return false
96 }
97 return bool(C.JS_IsSameValue(v.ctx.ref, v.ref, other.ref))
98}
99
100// SameValueZero returns true if two values are the same according to JS SameValueZero.
101func (v *Value) SameValueZero(other *Value) bool {

Callers 3

TestValueComparisonAPIsFunction · 0.80
TestValueProxyHelpersFunction · 0.80

Calls 1

sameContextFunction · 0.85

Tested by 3

TestValueComparisonAPIsFunction · 0.64
TestValueProxyHelpersFunction · 0.64