different-platform
Return 'linux'
on Windows, otherwise return 'win32'
const differentPlatform = ; // on Windows; //=> 'linux' // on non-Windows OS, for example Linux and macOS; //=> 'win32'
Useful for testing the behavior of process.platform
-dependent code on the two platforms in combination with pretend-platform.
Installation
npm install different-platform
API
const differentPlatform = ;
differentPlatform()
Return: string
(linux
when process.platform
equals to 'win32'
, otherwise 'win32'
)
License
ISC License © 2018 Shinnosuke Watanabe