UNPKG
@mntm/stats
Version:
latest (1.0.1)
1.0.1
1.0.0
0.7.0
0.6.1
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
A package for integrating analytics tools
github.com/maxi-team/stats
maxi-team/stats
@mntm/stats
/
lib
/
dom.js
8 lines
(7 loc)
•
273 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{ getDocument, getWindow }
from
'ssr-window'
;
const
safeDocument =
getDocument
();
const
safeWindow =
getWindow
();
if
(
typeof
safeDocument.
body
.
appendChild
!==
'function'
) { safeDocument.
body
.
appendChild
=
(
child
) =>
child; }
export
{ safeDocument, safeWindow };