Skip to content

Commit

Permalink
added param view
Browse files Browse the repository at this point in the history
  • Loading branch information
runemadsen committed Oct 13, 2011
1 parent b78812d commit 2fef40d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .couchapprc
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
{}
{
"env" : {
"default" : {
"db" : "http://itpresidents:redburns@itp.ic.ht/public"
}
}
}
17 changes: 17 additions & 0 deletions views/params/map.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function(doc)
{
var k;
for(k in doc) {
if((k.indexOf("_")) != 0 && doc.hasOwnProperty(k)) {
var string = JSON.stringify(doc[k]);
if(string.length > 1000)
{
emit([k, string.substr(0, 500)], null);
}
else
{
emit([k, doc[k]], null);
}
}
}
}

0 comments on commit 2fef40d

Please sign in to comment.