
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@driimus/matchbox
Advanced tools
All-purpose matchers in JS
pnpm add @driimus/matchbox
Matcher functions are created by providing an array of tuples, where each entry consists of a predicate function and the output value for a successful match.
sync
Synchronous matching evaluates each predicates in order until a match is found.
import { matchbox } from '@driimus/matchbox';
const match = matchbox.sync([
[(x) => x === 0, 'none'],
[(x) => x > 0 && x <= 9, 'a few'],
[() => true, 'lots'],
]);
console.log(match(5)); // 'a few'
async
Asynchronous matching evaluates predicates concurrently and resolves with the first fulfilled match.
import { matchbox } from "@driimus/matchbox";
const match = matchbox.async([
[async (x) => x === 0, "none"],
[async (x) => x > 0 && x <= 9, "a few"],
[async (x) => x > 10, "lots"],
[
async (x) =>
new Promise((resolve, reject) =>
setTimeout(x > 50 ? resolve : reject, 10_000)
),
"too many",
],
]);
console.log(await match(99)); // 'lots'
FAQs
All-purpose matchers in JS
We found that @driimus/matchbox demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.