MCPcopy Index your code
hub / github.com/apache/pouchdb / mapper

Function mapper

lib/index-browser.js:9194–9204  ·  view source on GitHub ↗
(mapFun, emit)

Source from the content-addressed store, hash-verified

9192}
9193
9194function 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
9206function reducer(reduceFun) {
9207 var reduceFunString = reduceFun.toString();

Callers 1

updateViewInQueueFunction · 0.70

Calls 2

evalFunctionWithEvalFunction · 0.70
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…