UNPKG
@jsenv/import-map
Version:
latest (6.13.3)
6.13.3
6.13.2
6.13.1
6.13.0
6.12.0
6.11.1
6.11.0
6.10.0
6.9.2
6.9.1
6.9.0
6.8.1
6.8.0
6.7.4
6.7.3
6.7.2
6.7.1
6.7.0
6.6.1
6.6.0
6.5.1
6.5.0
6.4.1
6.4.0
6.3.0
6.2.0
5.5.0
5.4.0
5.3.0
5.2.0
5.0.0
4.2.0
4.1.0
4.0.0
3.1.0
3.0.0
2.1.0
2.0.0
1.2.0
1.1.0
1.0.0
Helpers to implement importmaps.
github.com/jsenv/jsenv-import-map
jsenv/jsenv-import-map
@jsenv/import-map
/
src
/
internal
/
tryUrlResolution.js
8 lines
(6 loc)
•
227 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{ hasScheme }
from
"./hasScheme.js"
import
{ resolveUrl }
from
"../resolveUrl.js"
export
const
tryUrlResolution
= (
string
, url
) => {
const
result =
resolveUrl
(
string
, url)
return
hasScheme
(result) ? result :
null
}