
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
Get the arguments of a function, arrow function, generator function, async function
Get the arguments of a function, arrow function, generator function, async function
$ npm install fn-args
import functionArguments from 'fn-args';
functionArguments(function (foo, bar) {});
//=> ['foo', 'bar']
functionArguments((foo, bar) => {});
//=> ['foo', 'bar']
functionArguments(function * (foo, bar) {});
//=> ['foo', 'bar']
functionArguments(async function (foo, bar) {});
//=> ['foo', 'bar']
The get-parameter-names package provides similar functionality to fn-args by extracting parameter names from a function. It offers a straightforward API and is often used for dependency injection and function introspection. Compared to fn-args, it provides similar capabilities but may have different performance characteristics or additional features.
The parse-function package is a more comprehensive tool that not only extracts parameter names but also provides detailed information about the function, such as its body and other metadata. It is more feature-rich compared to fn-args, making it suitable for more complex use cases where detailed function analysis is required.
FAQs
Get the arguments of a function, arrow function, generator function, async function
The npm package fn-args receives a total of 455,693 weekly downloads. As such, fn-args popularity was classified as popular.
We found that fn-args 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.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.