UNPKG
cycle-router
Version:
latest (3.1.1)
3.1.1
3.1.0
3.0.1
3.0.0
Router for Cycle.js
github.com/tylors/cycle-router
tylors/cycle-router
cycle-router
/
node_modules
/
history
/
es6
/
extractPath.js
11 lines
(7 loc)
•
208 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
"use strict"
;
function
extractPath
(
string
) {
var
match =
string
.
match
(
/^https?:\/\/[^\/]*/
);
if
(match ==
null
)
return
string
;
return
string
.
substring
(match[
0
].
length
); }
export
default
extractPath;