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