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

Method toPrimitiveNumber

object.go:890–896  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

888}
889
890func (o *Object) toPrimitiveNumber() Value {
891 if v := o.tryExoticToPrimitive(hintNumber); v != nil {
892 return v
893 }
894
895 return o.ordinaryToPrimitiveNumber()
896}
897
898func (o *Object) toPrimitiveString() Value {
899 if v := o.tryExoticToPrimitive(hintString); v != nil {

Callers 11

ToIntegerMethod · 0.95
ToFloatMethod · 0.95
ToNumberMethod · 0.95
dateproto_toJSONMethod · 0.80
toNumericFunction · 0.80
toPrimitiveNumberFunction · 0.80
EqualsMethod · 0.80
toBigIntFunction · 0.80
numberToBigIntFunction · 0.80
builtin_NumberMethod · 0.80
builtin_newNumberMethod · 0.80

Calls 2

tryExoticToPrimitiveMethod · 0.95

Tested by

no test coverage detected