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

gulf

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulf - npm Package Compare versions

Comparing version 0.4.8 to 0.4.9

25

lib/Document.js

@@ -58,3 +58,3 @@ /**

if(er) return cb(er)
document.content = ottype.deserialize? ottype.deserialize(snapshot.contents) : snapshot.contents
doc.content = ottype.deserialize? ottype.deserialize(snapshot.contents) : snapshot.contents
cb(null, doc)

@@ -145,6 +145,3 @@ })

link.on('link:edit', function onedit(edit) {
this.queue.push(function(cb) {
this.receiveEdit(edit, link, cb)
}.bind(this))
this.queue.start()
this.receiveEdit(edit, link)
}.bind(this))

@@ -198,3 +195,3 @@

*/
Document.prototype.receiveEdit = function(edit, fromLink, cb) {
Document.prototype.receiveEdit = function(edit, fromLink, callback) {
console.log('receiveEdit', edit)

@@ -204,7 +201,19 @@ edit = Edit.unpack(edit, this.ottype)

// Edit comes from master, or even better: we are master, yea baby!
this.dispatchEdit(edit, fromLink, cb)
this.queue.push(function(cb) {
this.dispatchEdit(edit, fromLink, function() {
cb()
callback && callback()
})
}.bind(this))
this.queue.start()
}else {
// check with master first
this.master.sendEdit(edit, function onack(err, edit) {
this.dispatchEdit(edit, fromLink, cb)
this.queue.push(function(cb) {
this.dispatchEdit(edit, fromLink, function() {
cb()
callback && callback()
})
}.bind(this))
this.queue.start()
}.bind(this))

@@ -211,0 +220,0 @@ }

{
"name": "gulf",
"version": "0.4.8",
"version": "0.4.9",
"description": "transport-agnostic operational transformation control layer",

@@ -10,4 +10,4 @@ "repository": {

"dependencies": {
"setimmediate": "1.x"
, "queue": "3.x"
"setimmediate": "1.x",
"queue": "3.x"
},

@@ -29,9 +29,14 @@ "keywords": [

"devDependencies": {
"mocha": "*"
, "expect.js": "*"
, "ottypes": "*"
"mocha": "*",
"expect.js": "*",
"ottypes": "*"
},
"author": "Marcel Klehr <mklehr@gmx.net>",
"license": [{"type": "GPL", "url": "http://opensource.org/licenses/GPL-3.0"}],
"license": [
{
"type": "GPL",
"url": "http://opensource.org/licenses/GPL-3.0"
}
],
"readmeFilename": "README.md"
}
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