UNPKG
create-serve
Version:
latest (1.0.1)
1.0.1
1.0.0
0.1.0
0.0.0
🍛 Ultralight http server with live reload. [CLI + API]
github.com/nativew/serve
nativew/serve
create-serve
/
src
/
utils
/
injectContent.js
10 lines
(7 loc)
•
244 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
injectCode
from
'../injectCode.js'
;
export
const
injectContent
= content => {
const
index = content.
indexOf
(
'</body>'
);
const
start = content.
slice
(
0
, index);
const
end = content.
slice
(index);
return
start +
injectCode
() + end; };