UNPKG
@loki/core
Version:
latest (0.35.0)
0.35.0
0.34.0
0.33.0
0.32.0
0.31.0
0.30.0
0.29.0
0.28.0
0.27.0
0.26.0
0.25.0
0.24.0
0.23.0
0.22.0
0.21.0
0.20.0
0.19.0
Loki Chrome target core lib
github.com/oblador/loki/tree/master/packages/core
oblador/loki
@loki/core
/
src
/
get-absolute-url.js
11 lines
(8 loc)
•
226 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
path =
require
(
'path'
);
const
getAbsoluteURL
= (
url
) => {
if
(url && url.
indexOf
(
'file:'
) ===
0
) {
return
`file:
${path.resolve(url.substr(
'file:'
.length))}
`
; }
return
url; };
module
.
exports
= getAbsoluteURL;