Add scripts to create myops-getqueryview:
[myops.git] / web / query / vendor / couchapp / lib / list.js
diff --git a/web/query/vendor/couchapp/lib/list.js b/web/query/vendor/couchapp/lib/list.js
new file mode 100644 (file)
index 0000000..ef20e71
--- /dev/null
@@ -0,0 +1,13 @@
+// Helpers for writing server-side _list functions in CouchDB
+exports.withRows = function(fun) {
+ var f = function() {
+    var row = getRow();
+    return row && fun(row);
+  };
+  f.iterator = true;
+  return f;
+}
+
+exports.send = function(chunk) {
+  send(chunk + "\n")
+}
\ No newline at end of file