node-queue
Advanced tools
Comparing version 0.2.3 to 0.3.0
@@ -41,3 +41,3 @@ var cradle = require('cradle') | ||
if (this.isConnected) { | ||
if (callback) { return callback(null); } | ||
if (callback) { return callback(null, this); } | ||
return; | ||
@@ -58,12 +58,26 @@ } | ||
db.save('_design/collection', { | ||
views: { | ||
findAll: { | ||
map: function(doc) { | ||
emit(doc.collectionName, doc); | ||
db.get('_design/collection', function(err, obj) { | ||
var view = { | ||
views: { | ||
findAll: { | ||
map: function(doc) { | ||
emit(doc.collectionName, doc); | ||
} | ||
} | ||
} | ||
}; | ||
if (err && err.error == 'not_found') { | ||
db.save('_design/collection', view, function(err) { | ||
if (callback) { return callback(null, self); } | ||
}); | ||
} else if (err) { | ||
if (callback) { return callback(err, self); } | ||
} else { | ||
db.save('_design/collection', obj._rev, view, function(err) { | ||
if (callback) { return callback(null, self); } | ||
}); | ||
} | ||
}, function(err) { | ||
if (callback) { return callback(err); } | ||
}); | ||
@@ -70,0 +84,0 @@ } |
{ | ||
"author": "adrai", | ||
"name": "node-queue", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31377
746
1