code: function substitute(originalString, params) {
  	"use strict";
  
  	var result = originalString;
  	if (params) {
  		Object.keys(params).forEach(function(key) {
  			result = result.replace(new RegExp('{' + key + '}', 'g'), params[key]);
  		});
  	}
  	return result;
  }
docs: /*
  Parses a string in order to substitue placeholders
  with provided params object.
  
  @param {String} originalString
  @param {Object} params
  @return {String} substituted string