Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
win-release
Advanced tools
Get the name of a Windows version from the release number: `5.1.2600` → `XP`
The win-release npm package is used to get the name of a Windows version from the release number. This can be useful for applications that need to display or log the Windows version in a human-readable format.
Get Windows version name from release number
This feature allows you to get the Windows version name from a given release number. In this example, the release number '10.0.19041' corresponds to Windows 10.
const winRelease = require('win-release');
console.log(winRelease('10.0.19041')); // '10'
The os-name package provides a more general solution for getting the name of the operating system, including Windows, macOS, and Linux. It is more versatile compared to win-release, which is specific to Windows.
The os-release package is another alternative that provides information about the operating system release. It is similar to win-release but offers more detailed information and supports multiple operating systems.
Get the name of a Windows version from the release number:
5.1.2600
→XP
$ npm install win-release
const os = require('os');
const winRelease = require('win-release');
// On a Windows XP system
winRelease();
//=> 'XP'
os.release();
//=> '5.1.2600'
winRelease(os.release());
//=> 'XP'
winRelease('4.9.3000');
//=> 'ME'
Type: string
By default, the current OS is used, but you can supply a custom release number, which is the output of os.release()
.
Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches os.release()
.
MIT © Sindre Sorhus
FAQs
Get the name of a Windows version from the release number: `5.1.2600` → `XP`
We found that win-release demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.