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

Function evalView

lib/index-browser.js:4070–4087  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

4068}
4069
4070function evalView(input) {
4071 var code = [
4072 'return function(doc) {',
4073 ' "use strict";',
4074 ' var emitted = false;',
4075 ' var emit = function (a, b) {',
4076 ' emitted = true;',
4077 ' };',
4078 ' var view = ' + input + ';',
4079 ' view(doc);',
4080 ' if (emitted) {',
4081 ' return true;',
4082 ' }',
4083 '};'
4084 ].join('\n');
4085
4086 return scopeEval(code, {});
4087}
4088
4089function validate(opts, callback) {
4090 if (opts.selector) {

Callers 1

filterFunction · 0.70

Calls 1

scopeEvalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…