MyApi.utils.js 715 B

123456789101112131415161718192021
  1. /**
  2. * @summary This is to test child namespaces.
  3. * @memberof MyApi.
  4. * @namespace utils
  5. */
  6. MyApi.utils = {};
  7. /**
  8. * @summary Formats the supplied `str` with the given replacement args and there indexes.
  9. * @memberof MyApi.utils.
  10. * @function format
  11. * @param {string} str - The format string.
  12. * @param {*} arg - The first of argument to format into the string.
  13. * @param {...*} [argN] - Any number of additional arguments.
  14. * @returns {string} The given `str` formatted with the supplied arguments.
  15. * @example {@caption Basic usage:}
  16. * var result = MyApi.utils.format( "Hello {0}! My name is {1}.", "Jill", "Jack" ); // => "Hello Jill! My name is Jack."
  17. */
  18. MyApi.utils.format = function(str, arg, argN){
  19. };