Created
May 29, 2019 14:42
-
-
Save karlbeecken/b53345c7580d94a084ae44a36530d790 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 shortSysName(name) { | |
var arr = name.split(" "); | |
var out; | |
if (arr[0] === "Microsoft") { | |
if (arr[2] === "Server") { | |
out = arr[1] + " " + arr[2] + " " + arr[3]; | |
} else { | |
out = arr[1] + " " + arr[2]; | |
} | |
} else { | |
out = name; | |
} | |
return out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment