Well, the easiest way to do it would be to check if the first character of "parameter" is a slash, using:
js code:
setnoteMesCmd = (parameter.charAt(0) === "/");
However, this is far from perfect, as Plus! allows commands to be escaped by doubling the slash and you should check that the command itself doesn't contain invalid characters. Therefore, the "best" way to do this is by using regular expressions!
js code:
setnoteMesCmd = (/^\/[^\s\/]+\s*[\s\S]*$/.test(parameter));
Basically, this is the same regular expression as you use in your command parser, the only difference is that it doesn't capture anything.