UNPKG

cross-env

Version:

Run scripts that set and use environment variables across platforms

9 lines (8 loc) 248 B
/** * Determines if the current platform is Windows * @returns true if running on Windows, false otherwise */ export function isWindows() { return (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE || '')); }