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.js
11 lines
(7 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
Object
.
defineProperty
(
exports
,
'__esModule'
, {
value
:
true
});
const
isWebview
= (
userAgent
) => {
return
/webview|wv|ip((?!.*Safari)|(?=.*like Safari))/i
.
test
(userAgent); };
exports
.
isWebview
= isWebview;
//# sourceMappingURL=is-webview.js.map