browsenpm
Version:
Browse packages, users, code, stats and more the public npm registry in style.
17 lines • 663 B
JSON
{
"_id": "_design/results",
"views": {
"delta": {
"map": "function(doc) { if (doc.name === 'delta') emit([doc.registry, doc.start], doc); }"
},
"ping": {
"map": "function(doc) { if (doc.name === 'ping') emit([doc.registry, doc.start], doc);}"
},
"publish": {
"map": "function(doc) { if (doc.name === 'publish') emit([doc.registry, doc.start], doc);}"
}
},
"lists": {
"byRegistry": "function(doc, req) { provides('json', function() { var result = {}; while (row = getRow()) { var name = row.key[0]; result[name] = result[name] || []; result[name].push(row.value); } send(JSON.stringify(result)); }); }"
}
}