Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
"if all you have is a hammer, everything looks like a nail" - Maslow's Hammer
In this package, Array.prototype.reduce is the hammer
It's a play on the latin phrase Reductio ad absurdum
In logic, reductio ad absurdum (Latin for "reduction to absurdity"; or argumentum ad absurdum, "argument to absurdity") is a form of argument which attempts either to disprove a statement by showing it inevitably leads to a ridiculous, absurd, or impractical conclusion, or to prove one by showing that if it were not true, the result would be absurd or impossible.
It is often said that of the big trio map
, filter
, and reduce
, the first two are redundant. In fact, it's trivial to implement both map
and filter
using reduce
.
This library exists to take that concept to an absurd extreme by using reduce
to implement as many different types of functional transforms as possible.
...and just maybe, new patterns/practice will emerge from pushing reduce
to its limits.
Import the desired namespace then call the operator from it
import { arrays } from 'absurdum';
const input = ['a', 'b', 'c', 'd'];
const output = arrays.reverse(input);
console.log(output);
// > ['d', 'c', 'b', 'a']
A CommonJS bundle is included for backward compatiblity with node <= 13.2
const CSV = require('absurdum/dist/absurdum.cjs');
A ES module bundle is included under dist/absurdum.esm.js
and is defined as the pkg.modules
entry point.
FAQs
Reductio Ad Absurdum - The Ridiculous Application of Reduce
The npm package absurdum receives a total of 10 weekly downloads. As such, absurdum popularity was classified as not popular.
We found that absurdum 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.