7 ms·
I'd argue that having the function process.isWindows() would be a bad design. You'd then need to add process.isMacOS(), process.isLinux(), etc. You can do a swi
by datpuz 7y ago
I'd argue that having the function process.isWindows() would be a bad design. You'd then need to add process.isMacOS(), process.isLinux(), etc. You can do a switch statement on process.platform.
- tonyedgecombe 7y agoI’m not sure a switch statement against a string is a great solution either although to some extent you are restrained by JavaScripts limitations.