5.0.1 • Published 2 months ago

os-name v5.0.1

Weekly downloads
3,396,593
License
MIT
Repository
github
Last release
2 months ago

os-name

Get the name of the current operating system\ Example: macOS Sierra

Useful for analytics and debugging.

Install

npm install os-name

Usage

import os from 'node:os';
import osName from 'os-name';

// On a macOS Sierra system

osName();
//=> 'macOS Sierra'

osName(os.platform(), os.release());
//=> 'macOS Sierra'

osName('darwin', '14.0.0');
//=> 'OS X Yosemite'

osName('linux', '3.13.0-24-generic');
//=> 'Linux 3.13'

osName('win32', '6.3.9600');
//=> 'Windows 8.1'

API

osName(platform?, release?)

By default, the name of the current operating system is returned.

You can optionally supply a custom os.platform() and os.release().

Check out getos if you need the Linux distribution name.

Contributing

Production systems depend on this package for logging / tracking. Please be careful when introducing new output, and adhere to existing output format (whitespace, capitalization, etc.).

Related


kanzhucai-nest-clireact-native-bluetooth2killi8n-react-native-fast-imagezfeddb-master-converterairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfjrabbitnimble-boilerdeneme323112mdbtools-node@snyk/snyk-dev@ntt_app/react-native-custom-notificationrabbit-boilerreact-native-covid-sdk@zeronejs/cli@zeroneorg/cli@znemz/build-infootto-cli@ywfe/cli@totvslabs/carolpri-clirelease-pluginbeasybtcilinsightintcgenip2l2forlernal10nsionic-app-libionicnode-dingtalk-robotnodejs-user-agentngx-compodocnmccnmcc-clireact-native-plugpag-wrapperreact-native-pulsator-nativereact-native-kakao-mapsreact-native-test-module-hhhreact-native-responsive-sizereact-native-modal-progress-barreact-native-biometric-authenticatereact-native-contact-listreact-native-flyyreact-native-dsphoto-modulereact-native-is7react-native-version-managerrespoke-adminregression-external-dtoreskriptrelease-itrelease-it-httppkgcachephonegapreact-electron-chunkynaludonative-kakao-loginnative-apple-loginnative-google-loginmarmot-clireact-native-ytximkitreact-picky-with-clearh-ionic-clihzero-react-scriptshzero-webpack-scriptsos-name-clirbradford-compodocanonymous-insightapp-scripts-ionic-adibirken-react-native-community-image-editorbluntlab-login-motdblitzazk-benchmarkasrtdcpcs6_loggercloud-backup-servercloud-backup-server-clientcordova-plugin-demotoastcoronavirus-trackerftl-netlify-buildgenerator-swiftdbmaster-clidiamondpkgdev-env-status-checkdatreeiodefault-user-agentdby-paas-electron-sdkdrowl-base-theme-iconseterrporterenv-infoenvtoolsf_yoshicc-flowbuttergtb
5.0.1

2 months ago

5.0.0

5 months ago

4.0.1

6 months ago

4.0.0

1 year ago

3.1.0

3 years ago

3.0.0

3 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago