{"name":"arch","description":"Better `os.arch()` for node and the browser -- detect OS architecture","version":"2.2.0","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"browser":"browser.js","types":"./index.d.ts","bugs":{"url":"https://github.com/feross/arch/issues"},"devDependencies":{"airtap":"^3.0.0","standard":"*","tape":"^5.0.0"},"homepage":"https://github.com/feross/arch","keywords":["browser","browserify","arch","cpu info","cpus","architecture","navigator.platform","x64","x86","64 bit","32 bit"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git://github.com/feross/arch.git"},"scripts":{"test":"standard && npm run test-node && npm run test-browser","test-browser":"airtap -- test/*.js","test-browser-local":"airtap --local -- test/*.js","test-node":"tape test/*.js"},"funding":[{"type":"github","url":"https://github.com/sponsors/feross"},{"type":"patreon","url":"https://www.patreon.com/feross"},{"type":"consulting","url":"https://feross.org/support"}],"gitHead":"af5b7e17787ad7b8eea40f28a52557dc3411cce1","_id":"arch@2.2.0","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==","shasum":"1bc47818f305764f23ab3306b0bfc086c5a29d11","tarball":"http://registry-npm.ywwl.com/arch/download/arch-2.2.0.tgz","fileCount":6,"unpackedSize":7755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmKAcCRA9TVsSAnZWagAAOi0P/15aq4m4rplGDRX1gQlY\nepoYmrbagUpTc/EPD+QXny6VyKO0ijq0jHiJRwQtokNGnEsgSWLV+DxX/oIh\n+PwLvdIPSI3bCmV1WvJVdeu/jgOQHYDgsyGKa2KD2t16w9KtR+cW4DOaZqQi\nAfKfQ08R8/2NWxwmtcH0g0sE+4xaSS76Y0lz6Wc0nUzbb8bI63+GHAAaLxz8\n/gIpA3IZvmBR7qRGfOtmHfA5pcPdJGBYBN6o6ZG77ayJZFS5DjNeTw7NCYXn\n3zrzzQTN4HV0TrmUXsVeJO6RiKmjHJFOd6Mh5fBmT/+2cIuoAFgLd8VUkX0h\nzJ8TtVGWdGpqEek9Q/mqKQaX6SKIvIS8zsli8FpFRO2ASrU2owJTjzzNECHL\niGRWmjBET8PXCe5fVTuVRHpFJfoymrC4ICGEE/46+OPmpWFnWPQ61B5wlTu0\n5EMyTekNpwAukxmqyGaeVezwY8Wkxsx6xp6EhJi4a/9qSn+kr25pH7GzXaYU\ngb7+bN1OBLN8fTBMH9+2by22jRNfFZdPPiIzV6hXMazPgstT3zkpxzh2lxP9\nWPUQtojFcH1wA7PzFGRmgWYOCHKSiIqYnQvUyuUGVB22lkOPUNXzV0VUr+K3\nJq/vVq0ksgRBnM550lJhcK7HK+wamN9/1GmNrFEEqp7ILPpaleqoZfCqNmCT\nZ9bZ\r\n=Km8U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCWlfhRsA2neuPxZurkvYw3+7cZwEfRFITuMHoo8w4UAiEA55FZjjAm/1GwSM7rPNApE8aD1MXeCMMLPQUBOq2Jrms="}],"size":3469,"noattachment":false,"key":"/arch/-/arch-2.2.0.tgz"},"maintainers":[{"name":"feross","email":"feross@feross.org"},{"name":"raynos","email":"raynos2@gmail.com"}],"_npmUser":{"name":"feross","email":"feross@feross.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/arch_2.2.0_1603837979699_0.8268372470839678"},"_hasShrinkwrap":false,"readme":"# arch [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[ci-image]: https://img.shields.io/github/workflow/status/feross/arch/ci/master\n[ci-url]: https://github.com/feross/arch/actions\n[npm-image]: https://img.shields.io/npm/v/arch.svg\n[npm-url]: https://npmjs.org/package/arch\n[downloads-image]: https://img.shields.io/npm/dm/arch.svg\n[downloads-url]: https://npmjs.org/package/arch\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n### Better `os.arch()` for node and the browser -- detect OS architecture\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/arch2.svg)](https://saucelabs.com/u/arch2)\n\nThis module is used by [WebTorrent Desktop](http://webtorrent.io/desktop) to\ndetermine if the user is on a 32-bit vs. 64-bit operating system to offer the\nright app installer.\n\nIn Node.js, the `os.arch()` method (and `process.arch` property) returns a string\nidentifying the operating system CPU architecture **for which the Node.js binary\nwas compiled**.\n\nThis is not the same as the **operating system CPU architecture**. For example,\nyou can run Node.js 32-bit on a 64-bit OS. In that situation, `os.arch()` will\nreturn a misleading 'x86' (32-bit) value, instead of 'x64' (64-bit).\n\nUse this package to get the actual operating system CPU architecture.\n\n**BONUS: This package works in the browser too.**\n\n## install\n\n```\nnpm install arch\n```\n\n## usage\n\n```js\nvar arch = require('arch')\nconsole.log(arch()) // always returns 'x64' or 'x86'\n```\n\nIn the browser, there is no spec that defines where this information lives, so we\ncheck all known locations including `navigator.userAgent`, `navigator.platform`,\nand `navigator.cpuClass` to make a best guess.\n\nIf there is no *affirmative indication* that the architecture is 64-bit, then\n32-bit will be assumed. This makes this package perfect for determining what\ninstaller executable to offer to desktop app users. If there is ambiguity, then\nthe user will get the 32-bit installer, which will work fine even for a user with\na 64-bit OS.\n\nFor reference, `x64` means 64-bit and `x86` means 32-bit.\n\nHere is some history behind these naming conventions:\n\n- https://en.wikipedia.org/wiki/X86\n- https://en.wikipedia.org/wiki/IA-32\n- https://en.wikipedia.org/wiki/X86-64\n\n## Node.js proposal - `os.sysarch()`\n\nNote: There is\n[a proposal](https://github.com/nodejs/node-v0.x-archive/issues/2862#issuecomment-103942051)\nto add this functionality to Node.js as `os.sysarch()`.\n\n## license\n\nMIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n","publish_time":1603837979901,"_cnpm_publish_time":1603837979901,"dist-tags":{"latest":"3.0.0"}}