different-platform

1.0.1 • Public • Published

different-platform

NPM version Build Status Coverage Status

Return 'linux' on Windows, otherwise return 'win32'

const differentPlatform = require('different-platform');
 
// on Windows
differentPlatform(); //=> 'linux'
 
// on non-Windows OS, for example Linux and macOS
differentPlatform(); //=> 'win32'

Useful for testing the behavior of process.platform-dependent code on the two platforms in combination with pretend-platform.

Installation

Use npm.

npm install different-platform

API

const differentPlatform = require('different-platform');

differentPlatform()

Return: string (linux when process.platform equals to 'win32', otherwise 'win32')

License

ISC License © 2018 Shinnosuke Watanabe

Package Sidebar

Install

npm i different-platform

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

3.06 kB

Total Files

4

Last publish

Collaborators

  • shinnn