
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.
Yeah.. don't know how to describe it better. The language executes your query and returns the closest future date (rounded down to day) that matches. Think of it as a cron for humans.
// "every" keyword in the beginning can be omitted
// plural and singular variations of the time unit keywords are interchangable (ex. day/days, week/weeks, month/months)
// "st", "nd", "rd" and "th" suffixes on the end of dates are required, but are interchangable
// "everyday" and "daily" are shorthands for "every day"
// "weekly" is a shorthand for "every week"
// "monthly" is a shorthand for "every month"
// "yearly" and "annually" are shorthands for "every year"
// oh, and also this thing is completely case-insensitive
// relative commands (add days to the "now")
every day // now + 1d
every 2 days // now + 2d
every week // now + 7d
every month // now + 1m
every year // now + 1y
every 5 years // now + 5y
// absolute commands (pick a nearest future date from the "now", that matches a certain query)
every sunday
every monday, tuesday, wednesday
every 8th
every 1st, 10th, 16th
every 32nd // error
every 8th, 10th, 32nd // error
every february 8th
every 1st, january 2nd, january 3rd, february 11th, march 21st
// execute arbitrary functions to calculate task offset in days
// (unsafe JavaScript code execution, this feature is turned off by default but can be enabled in settings for more advanced queries)
every f{:: (now) => Math.random() * 10 ::}
npm install dzen
import Dzen from "./classes/dzen";
import DzenError from "./classes/error";
const text = "every 5 days";
const dzen = new Dzen({
now: new Date(), // can be any date object
settings: {
allowUnsafeCodeExecution: false // turn on to allow executing arbitrary JavaScript functions in queries
}
});
const result = dzen.runLine(text); // you can also use dzen.runBlock(text) to run multiple queires at once
if (result instanceof DzenError) {
console.log(result.toString());
} else {
console.log(result.toLocaleDateString());
}
FAQs
A query language for describing repeating intervals
The npm package dzen receives a total of 2 weekly downloads. As such, dzen popularity was classified as not popular.
We found that dzen 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
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.