(mapFun, emit)
| 9225 | } |
| 9226 | |
| 9227 | function mapper(mapFun, emit) { |
| 9228 | // for temp_views one can use emit(doc, emit), see #38 |
| 9229 | if (typeof mapFun === "function" && mapFun.length === 2) { |
| 9230 | var origMap = mapFun; |
| 9231 | return function (doc) { |
| 9232 | return origMap(doc, emit); |
| 9233 | }; |
| 9234 | } else { |
| 9235 | return evalFunction(mapFun.toString(), emit); |
| 9236 | } |
| 9237 | } |
| 9238 | |
| 9239 | function reducer(reduceFun) { |
| 9240 | var reduceFunString = reduceFun.toString(); |
no test coverage detected
searching dependent graphs…