Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
rename-function-calls
Advanced tools
Renames functions calls, but leaves function definitions unchanged.
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');
npm install rename-function-calls
Replaces every function call named from
with another one that is named to
.
rename(src, 'log', 'print'); // => log(x) becomes print(x)
Name | Type | Description |
---|---|---|
origSrc | string | the original source |
fromName | string | name under which function is currently called |
toName | string | name to which the function calls should be renamed |
source with function calls renamed
generated with docme
MIT
FAQs
Renames functions calls, but leaves function definitions unchanged.
The npm package rename-function-calls receives a total of 13,801 weekly downloads. As such, rename-function-calls popularity was classified as popular.
We found that rename-function-calls demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.