
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
ts-cron-validator
Advanced tools
A TypeScript type level CRON expression validator!
Expressions supported are the one generated and describe on crontab.guru website. This means that you can use this library to check standard CRON expressions but also non standard one. Also, this type level validator works quite well in conjunction with cron engines such as node-cron.
For a live demo, you can try this codesandbox
To install this tiny library:
npm install ts-cron-validator
Then you have the choice between two helper functions:
Below some examples that show how to use those two helpers:
import { validCronExpression, validStandardCronExpression } from 'ts-cron-validator';
validStandardCronExpression('0 3 * * * '); // OK padding accepted
validStandardCronExpression('42 * * * '); // KO missing day of week part
validStandardCronExpression('59 4 * * *'); // OK
validStandardCronExpression('60 4 * * *'); // KO incorrect minutes part
validCronExpression('20 59 4 * dec mon'); // OK non standard CRON expression are accepted
// by validCronExpression()
FAQs
TypeScript type-level CRON expression validator
The npm package ts-cron-validator receives a total of 398 weekly downloads. As such, ts-cron-validator popularity was classified as not popular.
We found that ts-cron-validator 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
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.