(mapFun, emit)
| 9192 | } |
| 9193 | |
| 9194 | function mapper(mapFun, emit) { |
| 9195 | // for temp_views one can use emit(doc, emit), see #38 |
| 9196 | if (typeof mapFun === "function" && mapFun.length === 2) { |
| 9197 | var origMap = mapFun; |
| 9198 | return function (doc) { |
| 9199 | return origMap(doc, emit); |
| 9200 | }; |
| 9201 | } else { |
| 9202 | return evalFunctionWithEval(mapFun.toString(), emit); |
| 9203 | } |
| 9204 | } |
| 9205 | |
| 9206 | function reducer(reduceFun) { |
| 9207 | var reduceFunString = reduceFun.toString(); |
no test coverage detected
searching dependent graphs…