Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ma3route-sdk

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ma3route-sdk - npm Package Compare versions

Comparing version 0.8.3 to 0.8.4

13

CHANGELOG.md

@@ -11,2 +11,15 @@

## 0.8.4 - 27/02/2016
Changed:
* Poller emits `"message"` event only when one or more items are returned from API
* Poller only fires request, if there's **none** pending
Fixed:
* Poller should use the correct last read ID, irrespective of the order of returned items
## 0.8.3 - 17/02/2016

@@ -13,0 +26,0 @@

20

lib/poller.js

@@ -73,2 +73,3 @@ /**

this._timer = null;
this._requestPending = false;
return this;

@@ -89,13 +90,26 @@ }

me._get(args, function(err, items, meta, res) {
me._requestPending = false;
if (err) {
return me.emit("error", err);
}
// save the last read id
// emit 'message' event if we received items
if (items.length) {
me._params.lastreadId = items[items.length - 1].id;
// since we do not know if we are in ascending or descending
// order, please do check
var id1 = items[0].id;
var id2 = items[items.length - 1].id;
me._params.lastreadId = id1 > id2 ? id1 : id2;
return me.emit("message", items, meta, res);
}
return me.emit("message", items, meta, res);
return null;
});
}
me._timer = setInterval(function() {
// only send request, if there is none pending
if (me._requestPending) {
return null;
}
me._requestPending = true;
var args = { };

@@ -102,0 +116,0 @@ if (me._lastreadId) {

2

package.json
{
"name": "ma3route-sdk",
"version": "0.8.3",
"version": "0.8.4",
"description": "Node.js SDK for developing with the Ma3Route REST API",

@@ -5,0 +5,0 @@ "repository": {

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