MCPcopy Create free account
hub / github.com/babel/babel / getObject

Function getObject

packages/babel-plugin-proposal-function-bind/src/index.ts:15–21  ·  view source on GitHub ↗
(bind: t.BindExpression)

Source from the content-addressed store, hash-verified

13 }
14
15 function getObject(bind: t.BindExpression) {
16 if (t.isExpression(bind.object)) {
17 return bind.object;
18 }
19
20 return (bind.callee as t.MemberExpression).object;
21 }
22
23 function getStaticContext(bind: t.BindExpression, scope: Scope) {
24 const object = getObject(bind);

Callers 1

getStaticContextFunction · 0.70

Calls 1

isExpressionMethod · 0.65

Tested by

no test coverage detected