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

pouchdb-validation

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-validation - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

13

index.js

@@ -23,2 +23,5 @@ /*

var uuid = require("node-uuid");
var Promise = require("pouchdb-promise");
function oldDoc(db, id) {

@@ -60,4 +63,2 @@ return db.get(id, {revs: true}).catch(function () {

function doValidation(db, newDoc, options, callback) {
var Promise = db.constructor.utils.Promise;
var isHttp = ["http", "https"].indexOf(db.type()) !== -1;

@@ -96,3 +97,2 @@ if (isHttp && !options.checkHttp) {

var Promise = db.constructor.utils.Promise;
var userCtxPromise;

@@ -159,5 +159,4 @@ if (options.userCtx) {

var args = processArgs(this, callback, options);
var PouchDB = args.db.constructor;
doc._id = doc._id || PouchDB.utils.uuid();
doc._id = doc._id || uuid.v4();
var promise = doValidation(args.db, doc, args.options).then(function () {

@@ -186,4 +185,2 @@ return args.db.post(doc, args.options);

var args = processArgs(this, callback, options);
var PouchDB = args.db.constructor;
var Promise = PouchDB.utils.Promise;

@@ -194,3 +191,3 @@ var done = [];

var validations = bulkDocs.docs.map(function (doc) {
doc._id = doc._id || PouchDB.utils.uuid();
doc._id = doc._id || uuid.v4();
var validationPromise = doValidation(args.db, doc, args.options);

@@ -197,0 +194,0 @@

{
"name": "pouchdb-validation",
"version": "1.0.1",
"version": "1.0.2",
"main": "index.js",

@@ -12,3 +12,11 @@ "description": "A PouchDB plug-in that allows you to re-use your CouchDB validate_doc_update functions on the client side.",

"bugs": "https://bugs.launchpad.net/python-pouchdb",
"keywords": ["pouch", "pouchdb", "couch", "couchdb", "validation", "validate", "validate_doc_update"],
"keywords": [
"pouch",
"pouchdb",
"couch",
"couchdb",
"validation",
"validate",
"validate_doc_update"
],
"license": "Apache-2.0",

@@ -19,3 +27,5 @@ "author": "Marten de Vries",

"couchdb-eval": "^1.0.0",
"promise-nodify": "^1.0.0"
"promise-nodify": "^1.0.0",
"pouchdb-promise": "^0.0.0",
"node-uuid": "^1.4.1"
},

@@ -22,0 +32,0 @@ "devDependencies": {

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