Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: useragent
node v6.17.1
endpoint
share
tweet
var useragent = require('useragent'); var agent = useragent.parse('Googlebot-News'); // will log true console.log(agent.device.toJSON().family === 'Spider')
Created from: https://npm.runkit.com/useragent
Loading…
no comments
sign in
to comment