rename-function-calls
v0.1.1
Published
Renames functions calls, but leaves function definitions unchanged.
Downloads
100,560
Maintainers
Readme
rename-function-calls
Renames functions calls, but leaves function definitions unchanged.
var code = [
'function log(s) { console.error(s); }'
, 'function print(s) { console.log(s); }'
, 'print(\'hello\');'
, 'log(\'world\');'
].join('\n')
var rename = require('rename-function-call');
var renamed = rename('log', 'print', code)
console.log(renamed);
function log(s) { console.error(s); }
function print(s) { console.log(s); }
print('hello');
print('world');
Installation
npm install rename-function-calls
API
generated with docme
License
MIT