Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.
The is-windows npm package is a simple utility that determines if the current runtime environment is Windows. It's a straightforward package with a single primary function, which is to check the operating system.
Check if the OS is Windows
This feature allows developers to programmatically check if their code is running on a Windows operating system. This can be useful for writing platform-specific code or for runtime environment checks.
var isWindows = require('is-windows');
console.log(isWindows()); // returns true if running on Windows, false otherwise
The 'os' package is a core Node.js module that provides operating system-related utility methods. It is more comprehensive than is-windows, offering information such as the OS platform, architecture, release version, uptime, and more. Unlike is-windows, which is a single-purpose module for checking if the OS is Windows, 'os' can be used to gather a wide range of system details.
The 'platform' package is a more feature-rich library that can parse and interpret information about the platform your code is running on. It can provide details such as the operating system, its version, the browser name and version, and even the device manufacturer and model. Compared to is-windows, 'platform' offers a broader set of features for identifying not just the OS but also the runtime environment in more detail.
The 'check-os' package is another utility that allows you to check the operating system of the user's environment. It supports methods to check for Windows, MacOS, and Linux. This package provides a bit more functionality than is-windows by covering more operating systems, but it still focuses on the same basic functionality of OS detection.
Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
$ npm install --save is-windows
As of v0.2.0
this module always returns a function.
var isWindows = require('is-windows');
console.log(isWindows());
//=> returns true if the platform is windows
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
true
if the given string looks like a glob pattern or an extglob pattern… more | homepagetrue
if the path appears to be relative. | homepageCommits | Contributor |
---|---|
11 | jonschlinkert |
4 | doowb |
1 | SimenB |
1 | gucong3000 |
Jon Schlinkert
Copyright © 2018, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on February 14, 2018.
FAQs
Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.
The npm package is-windows receives a total of 11,936,508 weekly downloads. As such, is-windows popularity was classified as popular.
We found that is-windows demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.