is64bit
Check whether operating system CPU architecture is 64-bit or 32-bit (Supports browsers)
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install is64bit 
SYNC missed versions from official npm registry.

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.

Related

Current Tags

  • 2.0.0                                ...           latest (a year ago)

4 Versions

  • 2.0.0                                ...           a year ago
  • 1.0.2 [deprecated]           ...           4 years ago
  • 1.0.1 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           5 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE