code: function(formatString, value) {
  
                  var fieldDelimiterIndex;
                  var fieldDelimiter = '{';
                  var endPlaceholder = false;
                  var formattedStringArray = [];
  
                  while ((fieldDelimiterIndex = formatString.indexOf(fieldDelimiter)) !== -1) {
  
                      var pieceFormatedString, formatSpec, fieldName;
  
                      pieceFormatedString = formatString.slice(0, fieldDelimiterIndex);
  
                      if (endPlaceholder) {
                          formatSpec = pieceFormatedString.split(':');
                          fieldName = formatSpec.shift().split('.');
                          pieceFormatedString = value;
  
                          for (var i = 0; i < fieldName.length; i++)
                              pieceFormatedString = pieceFormatedString[fieldName[i]];
  
                          if (formatSpec.length)
                              pieceFormatedString = this.number(formatSpec, pieceFormatedString);
                      }
  
                      formattedStringArray.push(pieceFormatedString);
  
                      formatString = formatString.slice(fieldDelimiterIndex + 1);
                      endPlaceholder = !endPlaceholder;
                      fieldDelimiter = (endPlaceholder) ? '}' : '{';
                  }
                  formattedStringArray.push(formatString);
  
                  return formattedStringArray.join('');
              }
docs: Formatting string via the Python Format string. See https://docs.python.org/2/library/string.html#format-string-syntax)