
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
match-ts is a cute pattern matcher that you can use when you want your code to be super cool and chained.
match-ts is a cute pattern matcher that you can use when you want your code to be super cool and chained.
Get rid of those nasty if-else blocks and start matching!
examples
import match from 'match-ts';
const greet = (name?: string) =>
match(name)
.on(name === 'Carlos', `I'm not saying hi to you >:(`)
.on(name != null, `hey ${name} how are you :)`)
.otherwise('hey there friend');
const greetWithFunctionInputs = (name?: string) =>
match(name)
.on(n => n === 'Carlos', `I'm not saying hi to you >:(`)
.on(
n => n != null,
n => `hey ${n} how are you :)`
)
.otherwise(n => 'hey there friend');
greet('Carlos'); // "I'm not saying hi to you >:("
greetWithFunctionInputs('David'); // "hey David how are you :)"
Never break a beautiful chain for some lame imperative logic ever again!
FAQs
match-ts is a cute pattern matcher that you can use when you want your code to be super cool and chained.
The npm package match-ts receives a total of 0 weekly downloads. As such, match-ts popularity was classified as not popular.
We found that match-ts 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.