
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
Automatically extract pure functions from your javascript code for unit testing.
npm install --save purefuncs
Given:
// file: src/example.js
import {asd, boo} from 'asd'
import math from 'somewhere'
const z = 2;
function foo() {
const x = 3 + z;
function bla() {
const f = 5 + asd;
return x + 1;
}
function tada() {
return x + math.sin(x);
}
}
Run :
$ purefuncs src/example.js -o test/purefuncs/example.js
Output:
// file: test/purefuncs/example.js
export const foo = ({asd, math, z}) => () => {
const x = 3 + z;
function bla() {
const f = 5 + asd;
return x + 1;
}
function tada() {
return x + math.sin(x);
}
}
export const foo$bla = ({asd, x}) => () => {
const f = 5 + asd;
return x + 1;
}
export const foo$tada = ({math, x}) => () => {
return x + math.sin(x);
}
MIT
FAQs
Extract pure functions from javascript code for unit testing
The npm package purefuncs receives a total of 1 weekly downloads. As such, purefuncs popularity was classified as not popular.
We found that purefuncs 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
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.