I use jscodeshift to rename foo variable in my code snippet to bar:
foo
bar
function test(foo) { console.log({ foo}); }
the