node-schedule
Advanced tools
Comparing version 0.3.0 to 0.5.0
@@ -35,2 +35,9 @@ | ||
// Check for generator | ||
if (typeof this.job === 'function' && this.job.prototype.next) { | ||
this.job = function() { | ||
return this.next().value; | ||
}.bind(this.job()); | ||
} | ||
// define properties | ||
@@ -37,0 +44,0 @@ Object.defineProperty(this, 'name', { |
{ | ||
"name": "node-schedule", | ||
"version": "0.3.0", | ||
"version": "0.5.0", | ||
"description": "A cron-like and not-cron-like job scheduler for Node.", | ||
@@ -13,3 +13,3 @@ "keywords": [ | ||
"scripts": { | ||
"test": "nodeunit && npm run lint", | ||
"test": "nodeunit", | ||
"lint": "eslint lib" | ||
@@ -16,0 +16,0 @@ }, |
@@ -8,2 +8,8 @@ | ||
var es6; | ||
try { | ||
eval('(function* () {})()'); | ||
es6 = require('./es6/job-test')(schedule); | ||
} catch (e) {} | ||
var clock; | ||
@@ -84,2 +90,13 @@ | ||
}, | ||
"Run job in generator": function(test) { | ||
if (!es6) { | ||
test.expect(0); | ||
test.done(); | ||
return; | ||
} | ||
es6.jobInGenerator(test); | ||
clock.tick(3250); | ||
}, | ||
/* No jobs will run after this test for some reason - hide for now | ||
@@ -86,0 +103,0 @@ "Won't run job if scheduled in the past": function(test) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50421
15
1504
1