UNPKG
html-loader
Version:
latest (5.1.0)
next (1.0.0-alpha.0)
5.1.0
5.0.0
4.2.0
4.1.0
4.0.0
3.1.2
3.1.1
3.1.0
3.0.1
3.0.0
2.1.2
2.1.1
2.1.0
2.0.0
1.3.2
1.3.1
1.3.0
1.2.1
1.2.0
1.1.0
1.0.0
1.0.0-alpha.0
0.5.5
0.5.4
0.5.1
0.5.0
0.4.5
0.4.4
0.4.3
0.4.2
0.4.0
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
Html loader module for webpack
github.com/webpack-contrib/html-loader
webpack-contrib/html-loader
html-loader
/
dist
/
runtime
/
getUrl.js
14 lines
(12 loc)
•
305 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use strict"
;
module
.
exports
=
function
(
url, maybeNeedQuotes
) {
if
(!url) {
return
url; }
// eslint-disable-next-line no-underscore-dangle, no-param-reassign
url =
String
(url);
if
(maybeNeedQuotes &&
/[\t\n\f\r "'=<>`]/
.
test
(url)) {
return
"\""
.
concat
(url,
"\""
); }
return
url; };