module.exports = function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
const body = root.get().value.program.body;
root.find(j.CallExpression, {
callee: {
name: "foo"
}
}).replaceWith(path => {
return j.callExpression(j.memberExpression(j.identifier("foo"), j.identifier("bar"), false), []);
});
return root.toSource();
};