all files / Node/ prueba.js

100% Statements 6/6
100% Branches 6/6
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12      1× 1× 6× 5× 1× 1×      
/**
*Author: Iván Israel Sabido Cortés
**/
var _ = require('underscore');
exports.Mapping = function (map, scope){
  if(_.isUndefined(map) || _.isUndefined(scope) || _.isNull(map) || _.isNull(scope))
    return null;
  var mapFunction = new Function('map', 'data', 'return eval("("+map+")")');
  return mapFunction(map, scope.data);
}
//Hola