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

Method ToBool

value.go:133–135  ·  view source on GitHub ↗

ToBool returns the boolean value of the value.

()

Source from the content-addressed store, hash-verified

131
132// ToBool returns the boolean value of the value.
133func (v *Value) ToBool() bool {
134 return C.JS_ToBool(v.ctx.ref, v.ref) == 1
135}
136
137// String returns the string representation of the value.
138// This method implements the fmt.Stringer interface.

Callers 15

BoolMethod · 0.95
TestContextAsyncFunction · 0.80
ExampleFunction · 0.80
unmarshalMethod · 0.80
unmarshalInterfaceMethod · 0.80

Calls

no outgoing calls

Tested by 15

TestContextAsyncFunction · 0.64
ExampleFunction · 0.64
TestValueConversionsFunction · 0.64
TestValueSpecialTypesFunction · 0.64