Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

os-name

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

os-name

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

  • 6.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3M
decreased by-19.88%
Maintainers
1
Weekly downloads
 
Created

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

Keywords

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc