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

Function instanceOfOperator

object.go:1419–1428  ·  view source on GitHub ↗
(o Value, c *Object)

Source from the content-addressed store, hash-verified

1417}
1418
1419func instanceOfOperator(o Value, c *Object) bool {
1420 if instOfHandler := toMethod(c.self.getSym(SymHasInstance, c)); instOfHandler != nil {
1421 return instOfHandler(FunctionCall{
1422 This: c,
1423 Arguments: []Value{o},
1424 }).ToBoolean()
1425 }
1426
1427 return c.self.hasInstance(o)
1428}
1429
1430func (o *Object) get(p Value, receiver Value) Value {
1431 switch p := p.(type) {

Callers 3

hasInstanceMethod · 0.85
execMethod · 0.85
InstanceOfMethod · 0.85

Calls 4

toMethodFunction · 0.85
getSymMethod · 0.65
ToBooleanMethod · 0.65
hasInstanceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…