couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stuart (SuperCoders)" <andrew.stu...@supercoders.com.au>
Subject Question regarding helper functions
Date Sun, 27 Mar 2011 10:07:01 GMT
hi folks

the following list includes a provides('html' helper function.  What  
are these helper functions?  Is there documentation/a reference guide  
of all helper functions somewhere?  Are they specific to couchdb,  
specific to lists?


{
    "_id": "_design/listtest",
    "_rev": "22-31ba90b5d72287897d5013a76c08c2c9",
    "lists": {
        "foo": "function(head, req) { var out = req.headers.Host ; var  
row; while (row = getRow()) { (out = out + row.value + '</ 
br>') };return out; }",
        "bar": "function() { return 'zoom!' }",
        "bas": "function(head, req) {provides('html', function()  
{send('<html><body>');var row;while (row = getRow()) {send(row.value +  
'</br>');}return '</body></html>';});}"
    }
}


thanks

Mime
View raw message