you can check if global process.platform.match(/^win/i)