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.0 to 0.5.1

6

lib/schedule.js

@@ -36,6 +36,8 @@

// Check for generator
if (typeof this.job === 'function' && this.job.prototype.next) {
if (typeof this.job === 'function' &&
this.job.prototype &&
this.job.prototype.next) {
this.job = function() {
return this.next().value;
}.bind(this.job());
}.bind(this.job.call(this));
}

@@ -42,0 +44,0 @@

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

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

@@ -18,4 +18,17 @@

}, 3250);
},
jobContextInGenerator: function(test) {
test.expect(1);
var job = new schedule.Job('name of job', function*() {
test.ok(this.name === 'name of job');
});
job.runOnDate(new Date(Date.now() + 3000));
setTimeout(function() {
test.done();
}, 3250);
}
}
}

@@ -100,2 +100,13 @@

},
"Context is passed into generator correctly": function(test) {
if (!es6) {
test.expect(0);
test.done();
return;
}
es6.jobContextInGenerator(test);
clock.tick(3250);
},
/* No jobs will run after this test for some reason - hide for now

@@ -102,0 +113,0 @@ "Won't run job if scheduled in the past": function(test) {

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