UNPKG

typia

Version:

Superfast runtime validators with only one line

16 lines (15 loc) 694 B
import { __notationRename } from "./private/__notationRename.mjs"; //#region src/internal/_notationPascal.ts const _notationPascalSnake = (str) => { while (str.startsWith("_")) str = str.substring(1); if (str.length === 0) return ""; const index = str.indexOf("_"); return index < 0 ? `${str[0].toUpperCase()}${str.substring(1).toLowerCase()}` : `${str[0].toUpperCase()}${str.substring(1, index).toLowerCase()}${_notationPascalSnake(str.substring(index + 1))}`; }; const _notationPascal = __notationRename({ plain: (str) => `${str[0].toUpperCase()}${str.substring(1)}`, snake: _notationPascalSnake }); //#endregion export { _notationPascal }; //# sourceMappingURL=_notationPascal.mjs.map