Created
February 1, 2021 13:38
-
-
Save GoodBoyNinja/c2fdf6fc18846eea7ddcc0dd05b26c07 to your computer and use it in GitHub Desktop.
This function is described as "isMacOS" in order to easily use the returned result (true / false) to do stuff accordingly. Check out the example code for a proper use of this function.
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
function isMacOS(){ | |
var currentSystemOS = String($.os).toLowerCase(); | |
if (currentSystemOS.indexOf("mac") == -1) { | |
return false | |
} else { | |
return true; | |
} | |
} | |
isMacOS(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment