Advertisement
marcelofoxes

couchdb list function for unit testing

Dec 6th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let js = './../../couchdb/clientes/lists/filtro.js';
  2.  
  3. function readListFunction(file) {
  4.     let fs = require('fs');
  5.     let func = 'var listfunc = ' + fs.readFileSync(file) + ';';
  6.     // isto é seguro!
  7.     // jshint -W061
  8.     eval(func);
  9.     return listfunc;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement