UNPKG
@10yun/open-sdk
Version:
latest (0.3.133)
0.3.133
0.3.132
0.3.131
0.3.130
0.3.129
0.3.128
0.3.127
0.3.126
0.3.125
0.3.124
0.3.123
0.3.122
0.3.121
0.3.120
0.3.119
0.3.118
0.3.117
0.3.116
0.3.115
0.3.114
0.3.113
0.3.112
0.3.111
0.3.110
0.3.109
0.3.108
0.3.107
0.3.106
0.3.105
0.3.104
0.3.103
0.3.102
0.3.101
0.3.100
0.3.99
0.3.98
0.3.97
0.3.96
0.3.95
0.3.89
开放平台接入sdk
gitee.com/open10/open-sdk
@10yun/open-sdk
/
build
/
common.js
10 lines
(9 loc)
•
247 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * 使用正则表达式进行过滤 * 过滤除了 https:// 和 http:// 以外的 // 和 /// */
export function
parseDomainUrl
(
str
) {
str
=
str
.
replace
(/\/(undefined\/)+/g,
'/'
);
str
=
str
.
replace
(/([^:]\/)\/+/g,
'$1'
);
return
str
; }