Created
May 27, 2016 19:57
-
-
Save michaelrhodes/6907bc77143896c70a3210ea5dc989b9 to your computer and use it in GitHub Desktop.
is-safari
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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