
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
npm i matchacho
return match(value,
// equals
1, () => 'One!',
// instanceof
Readable, (stream) => stream.read(),
Error, 'oopsie!',
// test function
positive, (number) => Math.sqrt(number),
// regular expression
/(?<left>\d+) \+ (?<right>\d+)/, (value, groups) => groups.left + groups.right,
// object matching
{ statusCode: 200 }, (response) => response.data,
// array matching
[0, 1], (numbers) => `${numbers[0]} + ${numbers[1]}`,
// nested test function
{ statusCode: (x) => x >= 200 && x < 300 }, (response) => response.data,
// default
(value) => value
)
function positive (value) {
return value > 0
}
FAQs
Pattern matching for JavaScript
The npm package matchacho receives a total of 429 weekly downloads. As such, matchacho popularity was classified as not popular.
We found that matchacho demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.