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

frodoio

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frodoio - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

2

package.json
{
"name": "frodoio",
"version": "0.9.1",
"version": "0.9.2",
"description": "Node.js library for distributing requests in a ring of servers",

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

@@ -10,8 +10,18 @@ var Etcd = require('./promise.etcd');

this.ready = Q();
var servers = this.config.servers || [
var rawServers = this.config.etcdServers || [
{ host: '127.0.0.1', port: 4001 }
];
if (!_.isArray(servers)) {
servers = [ servers ];
if (!_.isArray(rawServers)) {
rawServers = [ rawServers ];
}
var servers = [];
rawServers.forEach(function (server) {
if (_.isString(server)) {
servers.push({ host: server, port: 4001 });
} else if (_.isObject(server)) {
servers.push({ host: server.host || '127.0.0.1', port: server.port || 4001 });
} else {
throw new Error(server + ' as a server should be an address <string> or { host: <string>, port: <integer> }')
}
});

@@ -21,3 +31,3 @@ // TODO: Support more than one server

if (!config.lazy) {
if (!this.config.lazy) {
this.ready = this.init();

@@ -24,0 +34,0 @@ }

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