
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
add-func-name
Advanced tools
Add temp name to anonymous function for debugging.
Google Chrome's developer tool is awesome, but it is difficult to find where the closure is created? This tool save your time for reducing memory leak and debugging.
This tool adds names to anonymous functions.
$ npm install add-func-name
$ add-func-name [option] input_folder
-e name, --exclude=name
Filter file or/and folder by name. You can use this option several times.
-o, --output
Output folder
-r, --replace
Replace exisiting source code.
-q, --quiet
Stop console output
-h, --help
Display help
$ add-func-name -e node_modules -o sample_output sample
// anonymous immidiate function
(function () {
var express = require('../../');
var app = express();
// anonymous fuction for event handler
app.get('/', function (req, res){
res.send('Hello World');
});
// anonymous function in object notation
var obj = {
hello: function () {
console.log("hello");
}
};
// anonymous function assigned to variable
var good_morning = function () {
console.log("good morning");
}
app.listen(3000);
console.log('Express started on port 3000');
})();
It uses esprima and it removes comment. So resulting files don't have comment.
(function ANONYMOUS_FUNC_0() {
var express = require('../../');
var app = express();
app.get('/', function ANONYMOUS_FUNC_1(req, res) {
res.send('Hello World');
});
var obj = {
hello: function ANONYMOUS_FUNC_hello_2() {
console.log('hello');
}
};
var good_morning = function ANONYMOUS_FUNC_good_morning_3() {
console.log('good morning');
};
app.listen(3000);
console.log('Express started on port 3000');
}());
Don't be afraid JSX! If you have an experience of JavaScript, you can learn JSX quickly.
To create development environment, call following command:
$ npm install
$ grunt test
# Build application or library for JS project
$ grunt build
# Generate API reference
$ grunt doc
GPL-V3
Complete license is written in LICENSE.md.
FAQs
Add temp name to anonymous function for debugging
We found that add-func-name 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.