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

is64bit

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

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)

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
increased by1.4%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 23 Oct 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