X-Git-Url: http://git.onelab.eu/?p=myops.git;a=blobdiff_plain;f=web%2Fquery%2Fvendor%2Fcouchapp%2Flib%2Flist.js;fp=web%2Fquery%2Fvendor%2Fcouchapp%2Flib%2Flist.js;h=ef20e71dd05b8b4d4f16c3c597e49f84a6917efc;hp=0000000000000000000000000000000000000000;hb=85070b3d456667f238051af1a2f1f2a0c12300ab;hpb=607f0e13927eb18075c375fa9ba5527da4fcbb44 diff --git a/web/query/vendor/couchapp/lib/list.js b/web/query/vendor/couchapp/lib/list.js new file mode 100644 index 0000000..ef20e71 --- /dev/null +++ b/web/query/vendor/couchapp/lib/list.js @@ -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