(bind, scope)
| 54 | } |
| 55 | |
| 56 | function inferBindContext(bind, scope) { |
| 57 | const staticContext = getStaticContext(bind, scope); |
| 58 | if (staticContext) return _core.types.cloneNode(staticContext); |
| 59 | const tempId = getTempId(scope); |
| 60 | |
| 61 | if (bind.object) { |
| 62 | bind.callee = _core.types.sequenceExpression([_core.types.assignmentExpression("=", tempId, bind.object), bind.callee]); |
| 63 | } else { |
| 64 | bind.callee.object = _core.types.assignmentExpression("=", tempId, bind.callee.object); |
| 65 | } |
| 66 | |
| 67 | return _core.types.cloneNode(tempId); |
| 68 | } |
| 69 | |
| 70 | return { |
| 71 | name: "safe-function-bind", |
no test coverage detected