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

scuttlebutt

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scuttlebutt - npm Package Compare versions

Comparing version 5.5.17 to 5.5.18

11

model.js

@@ -52,2 +52,3 @@ var Scuttlebutt = require('./index')

//ignore if we already have a more recent value
if('undefined' !== typeof this.store[key]

@@ -60,2 +61,3 @@ && this.store[key][1] > update[1])

this.store[key] = update
this.emit.apply(this, ['update'].concat(update))

@@ -79,6 +81,9 @@ this.emit('change', key, update[0][1])

m.toJSON = function () {
var o = {}
for (var k in this.store)
o[k] = this.get(k)
var o = {}, notNull = false
for (var k in this.store) {
var v = this.get(k)
if(v != null)
o[k] = this.get(k)
}
return o
}

@@ -5,3 +5,3 @@ {

"description": "replicate data via scuttlebutt protocol",
"version": "5.5.17",
"version": "5.5.18",
"homepage": "https://github.com/dominictarr/scuttlebutt",

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

@@ -11,9 +11,12 @@ require('tape')('model', function (t) {

a.on('change', mac(function (key, value) {
t.deepEqual({}, a.toJSON())
a.once('change', mac(function (key, value) {
t.ok(expected[key] !== undefined)
t.equal(value, expected[key])
t.deepEqual(a.toJSON(), expected)
next()
}).atLeast(1))
a.on('change:key', mac(function (value) {
a.once('change:key', mac(function (value) {
t.equal(value, expected.key)

@@ -23,3 +26,2 @@ next()

a.set('key', expected.key)

@@ -29,5 +31,14 @@ var n = 2

if(--n) return
a.set('key', null)
t.equal(a.get('key'), null)
t.deepEqual(a.toJSON(), {})
t.end()
}
a.set('key', expected.key)
})
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