🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

os-name

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
o

os-name

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

6.0.0
latest
100

Supply Chain Security

100

Vulnerability

80

Quality

76

Maintenance

100

License

Version published
Weekly downloads
3.7M
9.25%
Maintainers
1
Weekly downloads
 
Created
Issues
1

What is os-name?

The os-name npm package is a simple utility that allows you to get the name of the operating system in a human-readable format. It is useful for logging, debugging, and displaying system information in a user-friendly way.

What are os-name's main functionalities?

Get OS Name

This feature allows you to get the name of the operating system. The code sample demonstrates how to use the os-name package to print the OS name to the console.

const osName = require('os-name');
console.log(osName());

Get OS Name with Version

This feature allows you to get the name of the operating system along with its version. The code sample shows how to use the os-name package to print the OS name and version to the console.

const osName = require('os-name');
console.log(osName(os.platform(), os.release()));

Other packages similar to os-name

FAQs

Package last updated on 24 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts