Skip to content

Commit

Permalink
Smaller JS modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-de-vries committed Aug 19, 2014
1 parent d1cfcd2 commit 565098b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var coucheval = require("couchdb-eval");
var couchdb_objects = require("couchdb-objects");
var nodify = require("promise-nodify");

var uuid = require("node-uuid");
var uuid = require("random-uuid-v4");
var Promise = require("pouchdb-promise");
var PouchPluginError = require("pouchdb-plugin-error");

Expand Down Expand Up @@ -174,7 +174,7 @@ exports.validatingPut = function (doc, options, callback) {
exports.validatingPost = function (doc, options, callback) {
var args = processArgs(this, callback, options);

doc._id = doc._id || uuid.v4();
doc._id = doc._id || uuid();
var promise = doValidation(args.db, doc, args.options).then(function () {
return methods(args.db).post(doc, args.options);
});
Expand Down Expand Up @@ -207,7 +207,7 @@ exports.validatingBulkDocs = function (bulkDocs, options, callback) {
}

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

return validationPromise.then(function (resp) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"couchdb-eval": "^1.0.0",
"promise-nodify": "^1.0.0",
"pouchdb-promise": "^0.0.0",
"node-uuid": "^1.4.1",
"random-uuid-v4": "^0.0.4",
"pouchdb-plugin-error": "^0.2.0"
},
"devDependencies": {
Expand Down

0 comments on commit 565098b

Please sign in to comment.