platform-name
Convert a Node.js platform identifier into a human-readable platform name: `openbsd` → `OpenBSD`
Last updated 2 years ago by shinnn .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install platform-name 
SYNC missed versions from official npm registry.

platform-name

npm version Build Status Coverage Status

Convert a Node.js platform identifier into a human-readable platform name

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 npm.

npm install platform-name

API

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

platformName([id])

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

Uses process.platform when it takes no arguments.

//On macOS

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

platformName.map

Type: Map

ID-name pairs used inside this module.

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

License

ISC License © 2018 Shinnosuke Watanabe

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

10 Versions

  • 1.0.0                                ...           2 years ago
  • 0.6.1                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 11
This Month 11
Last Day 1
Last Week 0
Last Month 13
Dependencies (1)
Dev Dependencies (5)

Copyright 2014 - 2017 © taobao.org |