
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
import { match } from "lit-match"
enum Progress {
None,
Loading,
Loaded,
}
const currentProgress = Progress.Loaded as Progress
the above is used for all proceeding examples:
const result = match(currentProgress)
.with(Progress.None, () => null)
.with(Progress.Loading, () => "loading")
.with(Progress.Loaded, () => "loaded")
.exhaustive()
console.log(result)
// ^? string | null
The exhaustive method will throw a compile-time error if not all variants have been exhausted.
const result = match(currentProgress)
.with(Progress.None, () => null)
.with(Progress.Loading, () => "loading")
.exhaustive()
// ^ throws compile-time error, not all variants have been exhausted
The else allows you to handle cases where no pattern matches, or can be used like a 'fallthrough' case.
const result = match(currentProgress)
.with(Progress.None, (value) => null)
// ^? Progress.None
.else((value) => "active")
// ^? Progress.Loading | Progress.Loaded
console.log(result)
// ^? null | "active"
FAQs
An awesome new package
The npm package lit-match receives a total of 4 weekly downloads. As such, lit-match popularity was classified as not popular.
We found that lit-match demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.