masm-couchdb
Advanced tools
Comparing version
11
main.js
@@ -0,1 +1,2 @@ | ||
var _ = require("underscore"); | ||
@@ -22,6 +23,12 @@ module.exports = function(cdb, changesDBName) { | ||
// (Error -> undefined) * (JSON -> undefined) -> undefined | ||
function changesListener(errorProc, process, since, changesDepleted) { | ||
function changesListener(errorProc, process, since, changesDepleted, changesOptions) { | ||
changesOptions = _.extend({ | ||
feed: "continuous", | ||
heartbeat: 55000, | ||
since: since, | ||
include_docs: true | ||
}, changesOptions) | ||
var handling = false; | ||
var changes = []; | ||
var req = cdb.get("/" + encodeURIComponent(changesDBName) + "/_changes", {feed: "continuous", heartbeat: 55000, since: since, include_docs: true}, function(res) { | ||
var req = cdb.get("/" + encodeURIComponent(changesDBName) + "/_changes", changesOptions, function(res) { | ||
if (res.statusCode < 200 || res.statusCode > 299 ) { | ||
@@ -28,0 +35,0 @@ errorProc(new Error("Failed access to database!")); |
{ | ||
"author" : "Marco Monteiro <marco@textovirtual.com>", | ||
"dependencies" : { | ||
"underscore": "1.x" | ||
}, | ||
"main" : "main.js", | ||
"name" : "masm-couchdb", | ||
"version" : "0.0.2" | ||
"version" : "0.0.3" | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9635
95.87%4
33.33%114
6.54%0
-100%1
Infinity%+ Added
+ Added