import { isUndefined } from './type-checks.mjs';

function uppercaseFirstLetter(s) {
  return s.charAt(0).toUpperCase() + s.slice(1);
}
function capitalize(s) {
  if (isUndefined(s)) {
    return s;
  }
  return s.split(" ").map((word) => uppercaseFirstLetter(word)).join(" ");
}

export { capitalize, uppercaseFirstLetter };
