UNPKG

libmodulor

Version:

A TypeScript library to create platform-agnostic applications

15 lines (14 loc) 344 B
export function capitalize(value) { const firstChar = value[0]; if (!firstChar) { return ''; } return (firstChar.toUpperCase() + value.slice(1)); } export function isCapitalized(value) { const firstChar = value[0]; if (!firstChar) { return true; } return firstChar === firstChar.toUpperCase(); }