Skip to content

Instantly share code, notes, and snippets.

@michaelrhodes
Created May 27, 2016 19:57
Show Gist options
  • Save michaelrhodes/6907bc77143896c70a3210ea5dc989b9 to your computer and use it in GitHub Desktop.
Save michaelrhodes/6907bc77143896c70a3210ea5dc989b9 to your computer and use it in GitHub Desktop.
is-safari
var safari = require('./regex')
// @return false or
// @return [string:version, boolean:is-mobile-safari]
module.exports = function (ua) {
var m = ua.match(safari)
return !m ? false : [m[1], !!m[2]]
}
module.exports = /Version\/([0-9]\.[0-9\.]+) (Mobile)?.*Safari/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment