Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@darkeyedevelopers/natural-cron.js
Advanced tools
Pure JavaScript library for converting natural English phrases into Cron expressions
Pure JS library for converting natural English phrases into Cron expressions.
<!-- link dist/natural-cron.min.js -->
<script src="pathToLibrary/natural-cron.min.js"></script>
<!-- call getCronString() from JS code whenever required-->
<script>
btn.onclick = function(){
let str = inputBox.value;
res.value = getCronString(str);
};
</script>
Install package with...
npm install @darkeyedevelopers/natural-cron.js
Import with require() & call getCronString() whenever required...
var getCronString = require('@darkeyedevelopers/natural-cron.js');
var cron = getCronString('every day at 2:55pm');
Output result pattern can be specified while calling getCronString()
function.
Parameter | Type | Default value | Description |
---|---|---|---|
Input string | String | Required. English phrase that has to be converted to corresponding Cron expression | |
Output pattern | String | 'MIN HOR DOM MON WEK YER' | Optional. Specifies the output pattern in which cron expression should be generated. MIN => MinutesHOR => HoursDOM => Day of MonthMON => Month(s)WEK => Weekday(s)YER => YearCombine one or more of the above to form result pattern. Checkout the examples below to understand better. |
55 2 3 JAN-AUG ? *
3 JAN-AUG *
3 * JAN-AUG 2
{3) some text JAN-AUG :)
Do you want to contribute ? Checkout CONTRIBUTING.md
FAQs
Pure JavaScript library for converting natural English phrases into Cron expressions
We found that @darkeyedevelopers/natural-cron.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.