repo.or.cz
/
mygpo.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
provide file type statistics for admins
[mygpo.git]
/
couchdb
/
_design
/
episode_stats
/
views
/
filetypes
/
map.js
blob
eadb4a932f6401323530986a6407bd1270aebef0
1
function(doc)
2
{
3
if(doc.doc_type == "Episode")
4
{
5
for(var n in doc.urls)
6
{
7
var url = doc.urls[n];
8
var i = url.lastIndexOf(".");
9
10
if(i >= 0)
11
{
12
/* exclude the dot */
13
var ext = url.substr(i+1);
14
15
/* make sure we exclude obvious non-extensions */
16
if (ext.length < 10)
17
{
18
emit(ext.toLowerCase(), url);
19
}
20
}
21
}
22
}
23
}