📱

Is mobile check

javascript
const parser = require('ua-parser-js')
function isUserAgentSignallingMobile(userAgentString) {
const ua = parser(userAgentString)
return ua.device.type === 'mobile'
}
Edit this page
Want to make your own site like this? Try gatsby-theme-code-notes by Zander Martineau.
Notes on code. My memory bank.