(input)
| 3905 | } |
| 3906 | |
| 3907 | function evalView(input) { |
| 3908 | var code = [ |
| 3909 | '"use strict";', |
| 3910 | 'var emitted = false;', |
| 3911 | 'var emit = function (a, b) {', |
| 3912 | ' emitted = true;', |
| 3913 | '};', |
| 3914 | 'var view = ' + input + ';', |
| 3915 | 'view(doc);', |
| 3916 | 'if (emitted) {', |
| 3917 | ' return true;', |
| 3918 | '}' |
| 3919 | ].join('\n'); |
| 3920 | |
| 3921 | return vm.runInNewContext('(function(doc) {\n' + code + '\n})'); |
| 3922 | } |
| 3923 | |
| 3924 | function validate(opts, callback) { |
| 3925 | if (opts.selector) { |
no outgoing calls
no test coverage detected
searching dependent graphs…