UNPKG

babel-plugin-recursive-tail-calls

Version:

A babel plugin for performing tail call optimization in recursive functions.

6 lines (5 loc) 219 B
import { isIdentifier } from "@babel/types"; export function isRecCall(path, identifier) { return (isIdentifier(path.node.callee) && path.scope.bindingIdentifierEquals(path.node.callee.name, identifier)); }