/
📱

is-mobile check

javascript
js
const parser = require('ua-parser-js')
function isUserAgentSignallingMobile(userAgentString) {
const ua = parser(userAgentString)
return ua.device.type === 'mobile'
}

Repo: github.com/faisalma...arser-js

Edit this page
Want to make your own site like this?
Try gatsby-theme-code-notes by Zander Martineau.
Notes on code. My second brain, by Zander Martineau.