Debian Codegraph @

packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/integration/helper-function-name/plugin.mjs

raw
1 import _nameFunction from "@babel/helper-function-name";
2 const nameFunction = _nameFunction.default || _nameFunction;
3
4 export default api => ({
5 visitor: {
6 FunctionExpression(path) {
7 const replacement = nameFunction(path);
8 if (replacement) path.replaceWith(replacement);
9 },
10 },
11 });