element-plus
Version:
A Component Library for Vue 3
1 lines • 932 B
Source Map (JSON)
{"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,SAAA,GAAY;AAKlB,MAAM,kBAAA,GAAqB,CAAC,MAAA,GAAS,EAAA,KAC1C,MAAA,CAAO,OAAA,CAAQ,qBAAA,EAAuB,MAAM,CAAA,CAAE,OAAA,CAAQ,IAAA,EAAM,OAAO;AAG9D,MAAM,UAAA,GAAa,CAAmB,GAAA,KAC3CA,YAAA,CAAa,GAAG;;;;"}