MCPcopy Create free account
hub / github.com/dop251/goja / toPrimitive

Method toPrimitive

object.go:906–911  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

904}
905
906func (o *Object) toPrimitive() Value {
907 if v := o.tryExoticToPrimitive(hintDefault); v != nil {
908 return v
909 }
910 return o.ordinaryToPrimitiveNumber()
911}
912
913func (o *baseObject) assertCallable() (func(FunctionCall) Value, bool) {
914 return nil, false

Callers 8

EqualsMethod · 0.95
EqualsMethod · 0.80
EqualsMethod · 0.80
EqualsMethod · 0.80
EqualsMethod · 0.80
EqualsMethod · 0.80
execMethod · 0.80
toPrimitiveFunction · 0.80

Calls 2

tryExoticToPrimitiveMethod · 0.95

Tested by

no test coverage detected