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

limitd-client

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

limitd-client - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

21

client.js

@@ -9,3 +9,2 @@ const url = require('url');

const Protocol = require('limitd-protocol');
const uuid = require('uuid/v1');

@@ -77,2 +76,4 @@ const disyuntor = require('disyuntor');

this.resetCircuitBreaker = () => this._request.reset();
this.currentId = 0;
}

@@ -82,2 +83,12 @@

LimitdClient.prototype.nextId = function () {
//start from 1 and conver to string because the protocol uses strings.
if (this.currentId < Number.MAX_SAFE_INTEGER) {
this.currentId++;
} else {
this.currentId = 1;
}
return (this.currentId).toString();
};
LimitdClient.prototype.connect = function (done) {

@@ -240,3 +251,3 @@ var options = this._options;

const request = {
'id': uuid(),
'id': this.nextId(),
'type': type,

@@ -278,3 +289,3 @@ 'key': key,

const request = {
'id': uuid(),
'id': this.nextId(),
'type': type,

@@ -292,3 +303,3 @@ 'key': key,

var request = {
'id': uuid(),
'id': this.nextId(),
'type': type,

@@ -304,3 +315,3 @@ 'key': key,

var request = {
'id': uuid(),
'id': this.nextId(),
'type': '',

@@ -307,0 +318,0 @@ 'key': '',

{
"name": "limitd-client",
"version": "2.1.4",
"version": "2.1.5",
"description": "limitd client for node.js",

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

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