Platform on which the current process is running.
var PLATFORM = require( '@stdlib/utils/platform' );
Platform on which the current process is running.
console.log( PLATFORM );
// returns <string>
var PLATFORM = require( '@stdlib/utils/platform' );
if ( PLATFORM === 'win32' ) {
console.log( 'Running on a PC...' );
}
else if ( PLATFORM === 'darwin' ) {
console.log( 'Running on a Mac...' );
}
else {
console.log( 'Running on something else...' );
}
Usage: platform [options]
Options:
-h, --help Print this message.
-V, --version Print the package version.
$ platform
<platform>