email.js
// Arguments: (injectables) = object whose properties are injected into the templates where {{property}} exist
(injectables) = object whose properties are injected into the templates where {{property}} exist
( injectables ) = object whose properties are injected into the templates where {{ property }} exist
function processEmailTemplates(filename, injectables) {
  var text = fs.readFileSync(filename).toString();
  for(var prop in injectables) {
    if(injectables.hasOwnProperty(prop)) {
      text = text.replace('{{' + prop + '}}', injectables[prop]);
      console.log("Replacing", prop, "result", text);
    }
  }
  return text;
}
function processEmailTemplates ( filename , injectables ) { var text = fs . readFileSync ( filename ) . toString ( ) ; for ( var prop in injectables ) { if ( injectables . hasOwnProperty ( prop ) ) { text = text . replace ( '{{' + prop + '}}' , injectables [ prop ] ) ; console . log ( "Replacing" , prop , "result" , text ) ; } } return text ; }
Arguments: (injectables) = object whose properties are injected into the templates where {{property}} exist
Arguments : ( injectables ) = object whose properties are injected into the templates where {{ property }} exist