UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 941 B
{"version":3,"file":"strings.mjs","sources":["../../../../packages/utils/strings.ts"],"sourcesContent":["import { camelize, hyphenate, capitalize as toCapitalize } from '@vue/shared'\n\nexport { camelize, hyphenate }\nexport const kebabCase = hyphenate\n\n/**\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\n */\nexport const escapeStringRegexp = (string = '') =>\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\n\n// NOTE: improve capitalize types. Restore previous code after the [PR](https://github.com/vuejs/core/pull/6212) merge\nexport const capitalize = <T extends string>(str: T) =>\n toCapitalize(str) as Capitalize<T>\n"],"names":["toCapitalize"],"mappings":";;;AAGO,MAAM,SAAY,GAAA,UAAA;AAKZ,MAAA,kBAAA,GAAqB,CAAC,MAAA,GAAS,EAC1C,KAAA,MAAA,CAAO,OAAQ,CAAA,qBAAA,EAAuB,MAAM,CAAA,CAAE,OAAQ,CAAA,IAAA,EAAM,OAAO,EAAA;AAG9D,MAAM,UAAa,GAAA,CAAmB,GAC3C,KAAAA,YAAA,CAAa,GAAG;;;;"}