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

node-schedule

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-schedule - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0

8

lib/schedule.js

@@ -18,2 +18,8 @@

function isValidDate(date) {
// Taken from http://stackoverflow.com/a/12372720/1562178
// If getTime() returns NaN it'll return false anyway
return date.getTime() === date.getTime();
}
function Job(name, job, callback) {

@@ -167,3 +173,3 @@ // setup a private pendingInvocations variable

if (spec instanceof Date) {
if ((spec instanceof Date) && (isValidDate(spec))) {
inv = new Invocation(self, spec);

@@ -170,0 +176,0 @@ scheduleInvocation(inv);

2

package.json
{
"name": "node-schedule",
"version": "0.5.1",
"version": "0.6.0",
"description": "A cron-like and not-cron-like job scheduler for Node.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -49,2 +49,12 @@

clock.tick(1250);
},
"Should not accept invalid string as valid date": function(test) {
test.expect(1);
var job = schedule.scheduleJob("hello!!", function() {
});
test.equal(job, null);
test.done();
}

@@ -51,0 +61,0 @@ },

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