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

sharedb-hooks

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharedb-hooks - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

22

index.js

@@ -5,2 +5,15 @@ var _ = require('lodash')

backend.onQuery = onQuery.bind(backend);
backend.use('apply', function(shareRequest, done) {
console.log('apply', shareRequest.snapshot)
const opData = shareRequest.op
const snapshot = shareRequest.snapshot
if (!opData.create && !shareRequest.originalSnapshot){
shareRequest.originalSnapshot = _.cloneDeep(snapshot)
}
done()
})
};

@@ -24,12 +37,3 @@

});
backend.use('apply', function(shareRequest, done) {
const opData = shareRequest.op
const snapshot = shareRequest.snapshot
if (!opData.create && !shareRequest.originalSnapshot){
shareRequest.originalSnapshot = _.cloneDeep(snapshot)
}
done()
})
}

@@ -36,0 +40,0 @@

{
"name": "sharedb-hooks",
"version": "3.0.3",
"version": "3.0.4",
"description": "ShareDb hooks",

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

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