You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

client-ketchup

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

client-ketchup - npm Package Compare versions

Comparing version

to
0.3.0

2

package.json
{
"name": "client-ketchup",
"version": "0.2.1",
"version": "0.3.0",
"description": "A simple interface for keeping remote clients up to date with their authoritative state",

@@ -5,0 +5,0 @@ "main": "src/client-state-update.js",

@@ -45,3 +45,3 @@ client-ketchup [![npm version](https://badge.fury.io/js/client-ketchup.svg)](http://badge.fury.io/js/client-ketchup) [![Build Status](https://travis-ci.org/chinedufn/client-ketchup.svg?branch=master)](https://travis-ci.org/chinedufn/client-ketchup)

// Use whatever network protocol you please in order to send updates
myClients['some-client-id-1'].websocket.send(minimalPatches)
myClients['some-client-id-1'].websocket.send(JSON.stringify(minimalPatches))

@@ -87,3 +87,3 @@ /*

Overwrite the clients state and receive JSON string-ified patches to send to a client
Overwrite the clients state and receive JSON patches to send to a client

@@ -90,0 +90,0 @@ Applying these patches to the old state creates the new state

@@ -31,5 +31,4 @@ var objectDiff = require('minimal-object-diff')

// We expect patches to be sent over a network so we string-ify them.
return JSON.stringify(patches)
return patches
}
}

@@ -9,5 +9,5 @@ var test = require('tape')

var patches = JSON.parse(CSU.update('key', { value: false }))
var patches = CSU.update('key', { value: false })
t.deepEqual(patches, {x: {value: false}, d: ['value2']})
})