Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-cron-plus

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-cron-plus - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

18

cronplus.js

@@ -54,2 +54,11 @@ const parser = require('cronstrue');

}
function isCronLike(expression){
if(expression.includes("*")){
return true;
}
let cleaned = expression.replace(/\s\s+/g, ' ');
let spaces = cleaned.split(" ");
return spaces.length >= 4 && spaces.length <= 6 ;
}
function parseDateSequence(expression){

@@ -60,2 +69,8 @@ let result = {isDateSequence: false, expression: expression};

let spl = expression.split(",");
for (let index = 0; index < spl.length; index++) {
spl[index] = spl[index].trim();
if(isCronLike(spl[index])){
return result;//fail
}
}
dates = spl.map(x => {

@@ -65,3 +80,4 @@ if(isNumber(x)){

}
return new Date(x);
let d = new Date(x);
return d;
})

@@ -68,0 +84,0 @@ }

2

package.json
{
"name": "node-red-contrib-cron-plus",
"version": "0.3.0",
"version": "0.4.0",
"description": "A flexible scheduler node for Node-RED (incl dynamic control and Timezone support)",

@@ -5,0 +5,0 @@ "main": "cronplus.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc