# platform-name

> Convert a Node.js platform identifier into a human-readable platform name: `openbsd` → `OpenBSD`

Latest version **1.0.0** (published 2018-03-26) · ISC license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2018-03-26 |
| First published | 2017-05-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | platform, name, os, system, id, identifier, convert, string, readable |

## Links

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

## Dependencies (1)

- [inspect-with-kind](https://npm.io/package/inspect-with-kind.md) ^1.0.4

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-03-26
- 0.6.1 — 2018-03-23
- 0.6.0 — 2018-03-20
- 0.5.0 — 2017-05-19
- 0.4.0 — 2017-05-17
- 0.3.0 — 2017-05-16
- 0.2.0 — 2017-05-12
- 0.1.0 — 2017-05-10
- 0.0.1 — 2017-05-10
- 0.0.0 — 2017-05-10

## README

# platform-name

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

Convert a [Node.js platform identifier](https://nodejs.org/api/os.html#os_os_platform) into a human-readable platform name

```javascript
const platformName = require('platform-name');

platformName('aix'); //=> 'AIX'
platformName('android'); //=> 'Android'
platformName('darwin'); //=> 'macOS'
platformName('freebsd'); //=> 'FreeBSD'
platformName('linux'); //=> 'Linux'
platformName('openbsd'); //=> 'OpenBSD'
platformName('sunos'); //=> 'Solaris'
platformName('win32'); //=> 'Windows'
```

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).

```
npm install platform-name
```

## API

```javascript
const platformName = require('platform-name');
```

### platformName([*id*])

*id*: `string` (one of `aix` `android` `darwin` `freebsd` `linux` `openbsd` `sunos` `win32`)  
Return: `string`

Uses [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) when it takes no arguments.

```javascript
//On macOS

platformName('linux'); //=> 'Linux'
platformName(); //=> 'macOS'
```

### platformName.map

Type: [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)

ID-name pairs used inside this module.

```javascript
platformName.map.get('win32'); //=> 'Windows'
```

## License

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

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