UNPKG

bootstrap-vue-next

Version:

BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.

17 lines (16 loc) 957 B
import { d as RX_UNDERSCORE, e as RX_LOWER_UPPER, f as RX_FIRST_START_SPACE_WORD, g as RX_SPACES, h as RX_START_SPACE_WORD, i as RX_REGEXP_REPLACE } from "./constants-DY6pmjuU.mjs"; const startCase = (str) => str.replace(RX_UNDERSCORE, " ").replace(RX_LOWER_UPPER, (_, $1, $2) => `${$1} ${$2}`).replace(RX_FIRST_START_SPACE_WORD, (_, $1, $2) => $1 + $2.toUpperCase()); const titleCase = (str) => str.replace(RX_UNDERSCORE, " ").replace(RX_LOWER_UPPER, (_, $1, $2) => `${$1} ${$2}`).replace(RX_START_SPACE_WORD, (_, $1, $2) => $1 + $2.toUpperCase()); const upperFirst = (str) => { const trim = str.trim(); return trim.charAt(0).toUpperCase() + trim.slice(1); }; const escapeRegExp = (str) => str.replace(RX_REGEXP_REPLACE, "\\$&"); const escapeRegExpChars = (str) => escapeRegExp(str).replace(RX_SPACES, "\\s"); export { escapeRegExpChars as e, startCase as s, titleCase as t, upperFirst as u }; //# sourceMappingURL=stringUtils-BCx12BQM.mjs.map