A super simple webview user-agent detector
$ npm install is-ua-webview
var isWebview = require('is-ua-webview')
// just for testing:
var assert = require('assert')
// identifies googlebot as bot (returns true)
assert(isWebview('Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'))
// Android Pixel is not a bot (returns false)
assert(!isWebview('Android 7.1; Pixel Build/NDE63P)'))
Run tests
npm test
Adam Eivy is a software architect by day and a drawing dad by night: follow him on the interwebs
Worthy of a tip? ⚡ Lightning Bitcoin Tips Accepted https://tippin.me/@antic