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

Method SameValueZero

value.go:101–106  ·  view source on GitHub ↗

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

(other *Value)

Source from the content-addressed store, hash-verified

99
100// SameValueZero returns true if two values are the same according to JS SameValueZero.
101func (v *Value) SameValueZero(other *Value) bool {
102 if !sameContext(v, other) {
103 return false
104 }
105 return bool(C.JS_IsSameValueZero(v.ctx.ref, v.ref, other.ref))
106}
107
108// Free the value.
109func (v *Value) Free() {

Callers 1

TestValueComparisonAPIsFunction · 0.80

Calls 1

sameContextFunction · 0.85

Tested by 1

TestValueComparisonAPIsFunction · 0.64