
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
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.
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
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.