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

dht-rpc

Package Overview
Dependencies
Maintainers
0
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dht-rpc - npm Package Compare versions

Comparing version 6.12.1 to 6.13.0

6

index.js

@@ -178,4 +178,6 @@ const { EventEmitter } = require('events')

toArray () {
return this.nodes.toArray().map(({ host, port }) => ({ host, port }))
toArray (opts) {
const limit = (opts && opts.limit)
if (limit === 0) return []
return this.nodes.toArray(limit).map(({ host, port }) => ({ host, port }))
}

@@ -182,0 +184,0 @@

{
"name": "dht-rpc",
"version": "6.12.1",
"version": "6.13.0",
"description": "Make RPC calls over a Kademlia based DHT",

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

@@ -342,5 +342,5 @@ # dht-rpc

#### `node.toArray()`
#### `node.toArray([options])`
Get the routing table peers out as an array of `{ host, port }`
Get the routing table peers out as an array of `{ host, port }`. Use `options.limit` to get a subset.

@@ -347,0 +347,0 @@ #### `node.addNode({ host, port })`

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