
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
function-code
Advanced tools

Turn functions into strings
npm install function-code
var functionCode = require('function-code');
console.log(functionCode(function (a, b) {
return a + b;
}, 2, 2));
Outputs
(function (a, b) {
return a + b;
}(2,2))
var functionCode = require('function-code');
console.log(functionCode.inline(function (a, b) {
var a = 1,
b = 2;
console.log('a + b = ', a + b);
}));
Outputs
var a = 1,
b = 2;
console.log('a + b = ', a + b);
Alias to functionCode(fn, args...)
Alias to functionCode(this, args...)
Alias to functionCode.inline(this)
FAQs
Turn functions into strings
The npm package function-code receives a total of 0 weekly downloads. As such, function-code popularity was classified as not popular.
We found that function-code 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.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.