"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

//#region src/words/capitalize.ts
/**
* @file Word-case helpers — `capitalize()` produces an upper-first / lower-rest
*   variant that iterates by code point so surrogate pairs aren't split.
*/
/**
* Capitalize the first letter of a word.
*
* @example
*   ;```typescript
*   capitalize('hello') // 'Hello'
*   capitalize('WORLD') // 'World'
*   capitalize('') // ''
*   ```
*/
/*@__NO_SIDE_EFFECTS__*/
function capitalize(word) {
	if (word.length === 0) return word;
	const [first, ...rest] = [...word];
	return (first ?? "").toUpperCase() + rest.join("").toLowerCase();
}

//#endregion
exports.capitalize = capitalize;