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

cabal-core

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cabal-core - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

10

index.js

@@ -41,4 +41,7 @@ var kappa = require('kappa-core')

this.maxFeeds = opts.maxFeeds
this.key = key || null
this.db = kappa(storage, { valueEncoding: json })
this.db = kappa(storage, {
valueEncoding: json
})

@@ -159,3 +162,6 @@ // Create (if needed) and open local write feed

Cabal.prototype.replicate = function () {
return this.db.replicate({ live: true })
return this.db.replicate({
live: true,
maxFeeds: this.maxFeeds
})
}

@@ -162,0 +168,0 @@

4

package.json
{
"name": "cabal-core",
"version": "4.0.0",
"version": "4.0.1",
"description": " p2p db functions for chat ",

@@ -40,3 +40,3 @@ "main": "index.js",

"inherits": "^2.0.3",
"kappa-core": "^2.3.0",
"kappa-core": "^2.7.0",
"kappa-view-level": "^1.1.0",

@@ -43,0 +43,0 @@ "memdb": "^1.3.1",

@@ -44,2 +44,12 @@ var View = require('kappa-view-level')

api: {
/**
* Creates a read stream of messages
* @param {Object} core - HyperCore to stream messages from.
* @param {String} channel - Name of channel
* @param {Object} opts :
* `gt` {Number} - Filter by timestamp where message.timestamp is greater than `gt`
* `lt` {Number} - Filter by timestamp where message.timestamp is lesser than `lt`
* Supports all levelup.createValueStream() options as well:
* `reverse` {Boolean} - Streams messages in Ascending time order, default: `true` (Descending)
*/
read: function (core, channel, opts) {

@@ -56,5 +66,3 @@ opts = opts || {}

this.ready(function () {
var v = lvl.createValueStream(xtend(opts, {
reverse: true
}))
var v = lvl.createValueStream(xtend({reverse: true}, opts))
v.pipe(t)

@@ -61,0 +69,0 @@ })

@@ -35,5 +35,3 @@ var View = require('kappa-view-level')

lvl.get('channel!topic!' + channel, (err, topic) => {
if (!err && topic) {
cb(null, topic)
}
cb(err, topic)
})

@@ -40,0 +38,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