Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// sentencecase.js
/* global AdventureJS A */

/**
 * Capitalizes the first char of a string.
 * @method AdventureJS#sentencecase
 * @memberOf AdventureJS
 * @param {String} string
 * @returns {String}
 */
AdventureJS.FX.sentencecase = function AdventureJS_sentencecase(string) {
  if ("string" !== typeof string) return "";
  string = string.charAt(0).toUpperCase() + string.slice(1);
  return string;
};