Socket
Socket
Sign inDemoInstall

is64bit

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is64bit

Check whether operating system CPU architecture is 64-bit or 32-bit (Supports browsers)


Version published
Weekly downloads
615K
decreased by-16.31%
Maintainers
1
Install size
10.1 kB
Created
Weekly downloads
 

Readme

Source

is64bit

Check whether operating system CPU architecture is 64-bit or 32-bit

This package also works in the browser. It can be useful to serve the correct binary for download.

On Node.js, process.arch / os.arch() is generally not useful as it returns the CPU architecture for which the Node.js binary was compiled, not the actual system architecture.

Install

npm install is64bit

Usage

import {is64bit} from 'is64bit';

// On ARM64 macOS
console.log(await is64bit());
//=> true

API

is64bit()

Returns a Promise<boolean> for whether the operating system CPU architecture is 64-bit.

is64bitSync()

Returns a boolean for whether the operating system CPU architecture is 64-bit.

Note: Prefer the async version for browser or cross-platform usage as it has a more reliable check.

  • system-architecture - Get the operating system CPU architecture

Keywords

FAQs

Last updated on 23 Oct 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc