
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
A tiny library for building recursive descent parsers. It's only 260 bytes!
Parsing is often something shrouded in mystery, obscure words and complicated diagrams. While this may be helpful for academics, it's not so helpful for your average Joe trying to parse web pages and learn a thing or two about compilers. Aprils aims to demystify parser construction so you can write one yourself.
In Aprils, a parser is just a function which takes an input string and returns a new string along with some data. The simplest type of parser is one which just matches a regular expression.
Here's a simple parser that matches numbers using /^\d+/.
const { use, need, skip } = require("aprils")
function number() {
return need(/^\d+/)
}
Let's test out our parser!
use("42 is the answer to life")
number() // returns "42"
Note: we usually place ^ at begining of regular expressions so that we match from the start of the input string.
Aprils provides a neat little function called skip. Skip does its best to parse something but doesn't throw an error if it fails. Skip can be used to add multiple choices.
function number() {
return need(/^\d+/)
}
function word() {
return need(/^\w+/)
}
// Accept a number *or* a word
function item() {
return skip(number) || word()
}
We can add as many choices as we want using JavaScript's || operator; the last one typically doesn't use a skip.
skip(A) || skip(B) || ... || skip(Y) || Z()
need(regex): checks if the input string matches a given regular expression. If so, it returns the matching value, otherwise it throws an error.
skip(parser, [...args]): executes parser on the input string and backtracks if parser fails.
peek(parser, [...args]): executes parser on the input string and always backtracks. This can be used to simply check the next token.
use(string): set the input string.
FAQs
A little parsing library
The npm package aprils receives a total of 0 weekly downloads. As such, aprils popularity was classified as not popular.
We found that aprils 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.