# different-platform

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

Latest version **1.0.1** (published 2018-03-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install different-platform
pnpm add different-platform
yarn add different-platform
bun add different-platform
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-03-05 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | another, different, platform, string, os, system |

## Links

- npm: https://www.npmjs.com/package/different-platform
- Repository: https://github.com/shinnn/different-platform
- Homepage: https://github.com/shinnn/different-platform#readme
- Issues: https://github.com/shinnn/different-platform/issues
- npm.io page: https://npm.io/package/different-platform

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-03-05
- 1.0.0 — 2017-07-27
- 0.1.0 — 2017-07-20
- 0.0.0 — 2017-07-20

## README

# different-platform

[![NPM version](https://img.shields.io/npm/v/different-platform.svg)](https://www.npmjs.com/package/different-platform)
[![Build Status](https://travis-ci.org/shinnn/different-platform.svg?branch=master)](https://travis-ci.org/shinnn/different-platform)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/different-platform.svg)](https://coveralls.io/github/shinnn/different-platform?branch=master)

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

```javascript
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`](https://nodejs.org/api/process.html#process_process_platform)-dependent code on the two platforms in combination with [pretend-platform](https://github.com/shinnn/pretend-platform).

## Installation

[Use npm.](https://docs.npmjs.com/cli/install)

```
npm install different-platform
```

## API

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

### differentPlatform()

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

## License

[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe

---
_Source: https://npm.io/package/different-platform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
