-
rename(origSrc, fromName, toName) → {string}
-
Replaces every function call named
fromwith another one that is namedto.Example
rename(src, 'log', 'print'); // => log(x) becomes print(x)
Parameters:
Name Type Description origSrcstring the original source
fromNamestring name under which function is currently called
toNamestring name to which the function calls should be renamed
Returns:
source with function calls renamed
- Type
- string
rename-function-calls
Renames functions calls, but leaves function definitions unchanged.
MIT
2 个版本
安装
npm install rename-function-calls
yarn add rename-function-calls
pnpm add rename-function-calls
bun add rename-function-calls
