mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
chore(cli): remove decamelize pkg for compatiblity issues
This commit is contained in:
@@ -20,6 +20,13 @@ function iframeReady(iframe, callback) {
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
const isMobile = /ios|iphone|ipod|ipad|android/.test(ua);
|
||||
|
||||
export function decamelize(str, sep = '-') {
|
||||
return str
|
||||
.replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
|
||||
.replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
|
||||
.toLowerCase();
|
||||
}
|
||||
|
||||
export {
|
||||
isMobile,
|
||||
iframeReady
|
||||
|
Reference in New Issue
Block a user