Package Exports
- platform-name
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (platform-name) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
platform-name
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
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