It's not even testing prefixes, it's testing the whole string. It's the equivalent of:
process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys'
Though I don't know enough about V8 to say how each is optimised.