New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clay-cron

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clay-cron - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

12

lib/cron.js

@@ -145,2 +145,6 @@ var exports,

var date = moment(start);
if (date.toString() == 'Invalid date') {
console.log("ERROR: You specified an invalid date.");
return date;
}
//if (this.zone && date.setTimezone)

@@ -154,8 +158,7 @@ //date.setTimezone(this.zone);

while (1) {
//console.log('asploshun');
var diff = date - start,
origDate = new Date(date);
origDate = new Date(date);
if (!(date.month() in this.month)) {
date.add(1, 'm');
date.add(1, 'M');
date.date(1);

@@ -293,4 +296,2 @@ date.hours(0);

_parseField: function(field, type, constraints) {
//var rangePattern = /^(\*)(?:\/(\d+))?$|(\d+)(?:-(\d+))?(?:\/(\d+))?(?:,|$)/g
var rangePattern = /^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g,

@@ -325,3 +326,2 @@ typeObj = this[type],

} while (pointer <= upper);
});

@@ -328,0 +328,0 @@ } else {

{
"name": "clay-cron",
"description": "Cron jobs for your node",
"version": "1.0.6",
"version": "1.0.7",
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (http://github.com/ncb000gt)",

@@ -17,5 +17,5 @@ "bugs" : {

},
"dependencies": {
"moment-timezone": "0.2.4"
},
"dependencies": {
"moment-timezone": "0.2.4"
},
"devDependencies": {

@@ -40,4 +40,5 @@ "nodeunit": ">=0.5.4"

"Vadim Baryshev <vadimbaryshev@gmail.com> (https://github.com/baryshev)",
"Leandro Ferrari <lfthomaz@gmail.com> (https://github.com/lfthomaz)"
"Leandro Ferrari <lfthomaz@gmail.com> (https://github.com/lfthomaz)",
"Gregg Zigler <greggzigler@gmail.com> (https://github.com/greggzigler)"
]
}

@@ -127,7 +127,3 @@ node-cron

If you want to specify timezones, you'll need to install the [time](https://github.com/TooTallNate/node-time) module or place an entry for it in your package.json file.
npm install time
API

@@ -134,0 +130,0 @@ ==========

@@ -176,2 +176,10 @@ var testCase = require('nodeunit').testCase,

},
'test next date from invalid date': function(assert) {
assert.expect(1);
var ct = new cron.CronTime('0 0 * * * *');
var nextDate = new Date('My invalid date string');
var nextdt = ct._getNextDateFrom(nextDate);
assert.equal(nextdt.toString(), 'Invalid date');
assert.done();
},
'test next real date': function(assert) {

@@ -178,0 +186,0 @@ assert.expect(2);

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