code: function format(str/*, args..*/) {
  	var maybeObject = arguments[1];
  	var args = (maybeObject !== null && typeof maybeObject === 'object') ? maybeObject : Array.prototype.slice.call(arguments, 1);
  	return str.replace(/\$\{([^}]+)\}/g, function(match, param) {
  		return args[param];
  	});
  }
docs: Pass varargs to get numbered parameters, or a single object for named parameters.
  eg. format('${0} dollars and ${1} cents', 3, 50);
  eg. format('${dollars} dollars and ${cents} cents', {dollars:3, cents:50});
  @param {String} str String to format.
  @param {varags|Object} arguments