
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@codefeathers/fuse
Advanced tools
FunctionSelect: Select a function that passes a condition. A functional alternative to switch-case.
FunctionSelect
Fuse
selects a function that passes a condition.
const Fuse = require('@codefeathers/fuse');
const a = 100;
const result = new Fuse(a)
.on(x => x>10,
a => `${a} is greater than 10.`)
.on(x => x<10,
a => `${a} is lesser than 10.`)
.on(x => x===10,
a => `${a} is 10.`)
console.log(result.resolve()); // -> "100 is greater than 10."
const { FuseIterable } = require('@codefeathers/fuse');
const temperatures = [ 0, 20, 30 ];
const result = new FuseIterable(temperatures)
.on(temp => temp<10,
() => `Too cold!`)
.on(temp => temp>=10 && temp <25,
() => `Just right.`)
.on(temp => temp>=25,
() => `Too warm!`)
console.log(result.resolve()); // -> [ "Too cold!", "Just right.", "Too warm!" ]
Docs exist in /docs
directory. Will be served soon.
If you find any mistakes in code/documentation, or if you feel something could be done better, do PR :) I appreciate it.
Place your test file as testscript.js
in root.
The following npm scripts are available: npm run lint
, npm test
, npm run debug
, npm run docs
.
@Floofies was of huge help during development of this module.
Also, @TRGWII was a source of inspiration and guidance.
FAQs
FunctionSelect: Select a function that passes a condition. A functional alternative to switch-case.
The npm package @codefeathers/fuse receives a total of 4 weekly downloads. As such, @codefeathers/fuse popularity was classified as not popular.
We found that @codefeathers/fuse 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
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.