Socket
Socket
Sign inDemoInstall

agenda

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agenda - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

5

History.md
0.4.3 / 2013-12-13
==================
* fix job.schedule's taking Date object as 'when' argument [@bars3s]
0.4.2 / 2013-12-11

@@ -3,0 +8,0 @@ ==================

2

lib/job.js

@@ -68,3 +68,3 @@ var humanInterval = require('human-interval'),

Job.prototype.schedule = function(time) {
this.attrs.nextRunAt = date(time);
this.attrs.nextRunAt = (time instanceof Date) ? time : date(time);
return this;

@@ -71,0 +71,0 @@ };

{
"name": "agenda",
"version": "0.4.2",
"version": "0.4.3",
"description": "Light weight job scheduler for Node.js",

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

@@ -213,3 +213,3 @@ # Agenda

`data` is an optional argument that will be passed to the processing function
under `job.data`.
under `job.attrs.data`.

@@ -216,0 +216,0 @@ Returns the `job`.

@@ -173,2 +173,3 @@ var expect = require('expect.js'),

describe('schedule', function() {
var job;
beforeEach(function() {

@@ -181,2 +182,8 @@ job = new Job();

});
it('sets the next run time Date object', function() {
var when = new Date(Date.now() + 1000*60*3);
job.schedule(when);
expect(job.attrs.nextRunAt).to.be.a(Date);
expect(job.attrs.nextRunAt.getTime()).to.eql(when.getTime());
});
it('returns the job', function() {

@@ -183,0 +190,0 @@ expect(job.schedule('tomorrow at noon')).to.be(job);

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