Formatter

Formatter

Provide methods to process strings with template sequences.

Constructor

new Formatter()

Version:
  • 1.0
Author:
  • Maksim Sandybekov
Source:

Methods

(static) format(text) → {string}

Performs replacement of template sequences in a reponse text, using arguments passed besides text.
Parameters:
Name Type Description
text string The response text, which may include template sequences of form {0}, {1}, ...
Source:
Example
formatResponse("Hello, {0}", "John"); // returns "Hello, John"