UNPKG
@dvlden/is-webview
Version:
latest (1.0.0)
1.0.0
Detect if a visitor is coming through a webview or a native browser using user-agent.
@dvlden/is-webview
/
dist
/
is-webview.mjs
7 lines
(5 loc)
•
176 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
isWebview
= (
userAgent
) => {
return
/webview|wv|ip((?!.*Safari)|(?=.*like Safari))/i
.
test
(userAgent); };
export
{ isWebview };
//# sourceMappingURL=is-webview.mjs.map