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 { a as RX_UNDERSCORE, b as RX_LOWER_UPPER, c as RX_FIRST_START_SPACE_WORD, d as RX_SPACES, e as RX_START_SPACE_WORD, f as RX_REGEXP_REPLACE } from "./constants-BdrZaBP8.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-i6NkPGA1.mjs.map