MCPcopy Create free account
hub / github.com/apache/pouchdb / getBuiltIn

Function getBuiltIn

lib/index.js:9220–9230  ·  view source on GitHub ↗
(reduceFunString)

Source from the content-addressed store, hash-verified

9218};
9219
9220function getBuiltIn(reduceFunString) {
9221 if (/^_sum/.test(reduceFunString)) {
9222 return builtInReduce._sum;
9223 } else if (/^_count/.test(reduceFunString)) {
9224 return builtInReduce._count;
9225 } else if (/^_stats/.test(reduceFunString)) {
9226 return builtInReduce._stats;
9227 } else if (/^_/.test(reduceFunString)) {
9228 throw new Error(reduceFunString + ' is not a supported reduce function.');
9229 }
9230}
9231
9232function mapper(mapFun, emit) {
9233 // for temp_views one can use emit(doc, emit), see #38

Callers 1

reducerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…