how to get os type node.js code example Example: how to check platform in nodejs var isWin = process.platform === "win32";