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

macos-version

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macos-version - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

24

index.js

@@ -5,3 +5,3 @@ 'use strict';

const isMacos = process.platform === 'darwin';
const isMacOS = process.platform === 'darwin';
let version;

@@ -12,4 +12,4 @@

const getVersion = () => {
if (!isMacos) {
throw new Error('Requires macOS');
if (!isMacOS) {
return;
}

@@ -22,3 +22,3 @@

if (!matches) {
throw new Error('Couldn\'t find the macOS version');
return;
}

@@ -29,3 +29,5 @@

return clean(version);
if (version) {
return clean(version);
}
};

@@ -37,4 +39,6 @@

x.isMacOS = isMacOS;
x.is = input => {
if (!isMacos) {
if (!isMacOS) {
return false;

@@ -46,4 +50,10 @@ }

x.assertMacOS = () => {
if (!isMacOS) {
throw new Error('Requires macOS');
}
};
x.isGreaterThanOrEqualTo = input => {
if (!isMacos) {
if (!isMacOS) {
return false;

@@ -50,0 +60,0 @@ }

{
"name": "macos-version",
"version": "4.0.1",
"version": "4.1.0",
"description": "Get or check the current macOS version",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -53,3 +53,11 @@ # macos-version [![Build Status](https://travis-ci.org/sindresorhus/macos-version.svg?branch=master)](https://travis-ci.org/sindresorhus/macos-version)

### assertMacOS()
Throws an error if platform is not macOS.
### .isMacOS
True if platform is macOS.
## Related

@@ -56,0 +64,0 @@

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