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

Function mapper

lib/index.es.js:9227–9237  ·  view source on GitHub ↗
(mapFun, emit)

Source from the content-addressed store, hash-verified

9225}
9226
9227function 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
9239function reducer(reduceFun) {
9240 var reduceFunString = reduceFun.toString();

Callers 1

updateViewInQueueFunction · 0.70

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…