Socket
Socket
Sign inDemoInstall

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.1.2 to 1.1.3

16

index.js

@@ -64,13 +64,13 @@ /*

if (typeof e.unauthorized !== "undefined") {
throw {
throw new PouchPluginError({
name: "unauthorized",
message: e.unauthorized,
status: 401
};
});
} else if (typeof e.forbidden !== "undefined") {
throw {
throw new PouchPluginError({
name: "forbidden",
message: e.forbidden,
status: 403
};
});
} else {

@@ -207,3 +207,7 @@ throw coucheval.wrapExecutionError(e);

var validations = bulkDocs.docs.map(function (doc) {
if (!Array.isArray(bulkDocs)) {
bulkDocs = bulkDocs.docs;
}
var validations = bulkDocs.map(function (doc) {
doc._id = doc._id || uuid.v4();

@@ -220,3 +224,3 @@ var validationPromise = doValidation(args.db, doc, args.options);

var allValidationsPromise = Promise.all(validations).then(function () {
return methods(args.db).bulkDocs({docs: notYetDone}, args.options);
return methods(args.db).bulkDocs(notYetDone, args.options);
}).then(function (insertedDocs) {

@@ -223,0 +227,0 @@ return done.concat(insertedDocs);

{
"name": "pouchdb-validation",
"version": "1.1.2",
"version": "1.1.3",
"main": "index.js",

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

"node-uuid": "^1.4.1",
"pouchdb-plugin-error": "^0.1.0"
"pouchdb-plugin-error": "^0.2.0"
},

@@ -32,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