{"id":49340624,"url":"https://github.com/jmealo/is-apple-silicon","last_synced_at":"2026-04-27T03:32:53.294Z","repository":{"id":57686934,"uuid":"489108858","full_name":"jmealo/is-apple-silicon","owner":"jmealo","description":"A Node.js module for detecting Apple Silicon CPUs and ensuring Node.js binary compatibility, optimized for Docker and native add-on development on macOS.","archived":false,"fork":false,"pushed_at":"2023-12-13T00:46:18.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-18T02:20:34.222Z","etag":null,"topics":["apple","arm64","cpu","mac","macos","osx","processor","rosetta","silicon"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/is-apple-silicon","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmealo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-05T19:55:52.000Z","updated_at":"2025-02-13T06:38:10.000Z","dependencies_parsed_at":"2022-09-19T08:25:46.930Z","dependency_job_id":null,"html_url":"https://github.com/jmealo/is-apple-silicon","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jmealo/is-apple-silicon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmealo%2Fis-apple-silicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmealo%2Fis-apple-silicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmealo%2Fis-apple-silicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmealo%2Fis-apple-silicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmealo","download_url":"https://codeload.github.com/jmealo/is-apple-silicon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmealo%2Fis-apple-silicon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32321512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","arm64","cpu","mac","macos","osx","processor","rosetta","silicon"],"created_at":"2026-04-27T03:32:53.226Z","updated_at":"2026-04-27T03:32:53.282Z","avatar_url":"https://github.com/jmealo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-apple-silicon\n\nThis Node.js module provides synchronous utility functions for detecting Apple Silicon CPUs and assessing Node.js binary\ncompatibility. It is particularly useful for ensuring that `node_modules` with native add-ons are correctly compiled for\nthe target architecture, especially when working with Docker containers on Macs with Apple Silicon.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Expected Outputs](#expected-outputs)\n- [Testing](#testing)\n- [Contributing](#contributing)\n\n## Installation\n\n```bash\nnpm install is-apple-silicon\n```\n\n## Usage\n\nThe module exports three functions:\n\n- `isAppleSilicon(forceCheck?)`: Determines if the system has an Apple Silicon CPU.\n- `isNodeNative(forceCheck?)`: Checks if Node.js is running natively on the system's architecture.\n- `isRosetta(forceCheck?)`: Identifies if the process is running under Rosetta translation on Apple Silicon.\n\nEach function includes an optional forceCheck parameter, set to false by default. When true, this parameter bypasses the cached results and forces a fresh check of os.arch() and os.cpus().\n\n## Examples\n\n### CommonJS\n\n```javascript\nconst {isAppleSilicon, isNodeNative, isRosetta} = require('is-apple-silicon');\n```\n\n### ESM\n\n```javascript\nimport {isAppleSilicon, isNodeNative, isRosetta} from 'is-apple-silicon';\n```\n\n## Expected Outputs\n\nNode.js 16+ is required for Apple Silicon support. Node.js 14 and earlier only supports x86 (it will always\nreturn `false` for `isNodeNative()` on Apple Silicon).\n\n#### On a MacBook Pro with Apple Silicon and Node 14 (no arm64 support):\n\n- `isAppleSilicon() === true`\n- `isNodeNative() === false`\n- `isRosetta() === true`\n\n#### On MacBook Pro with Apple Silicon and Node 16+ (arm64 support):\n\n- `isAppleSilicon() === true`\n- `isNodeNative() === true`\n- `isRosetta() === false`\n\n#### On Intel MacBook Pro with Node 16+ (x64):\n\n- `isAppleSilicon() === false`\n- `isNodeNative() === true`\n- `isRosetta() === false`\n\n#### On a non-Apple machine:\n\n- `isAppleSilicon() === false`\n- `isNodeNative() === true`\n- `isRosetta() === false`\n\n## Testing\n\nThe module includes a test script that can be run with `npm test`.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit pull requests or open issues for any bugs or feature requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmealo%2Fis-apple-silicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmealo%2Fis-apple-silicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmealo%2Fis-apple-silicon/lists"}