https://github.com/samuelmaddock/read-binary-file-arch
Reads a binary file to determine its CPU architecture.
https://github.com/samuelmaddock/read-binary-file-arch
Last synced: over 1 year ago
JSON representation
Reads a binary file to determine its CPU architecture.
- Host: GitHub
- URL: https://github.com/samuelmaddock/read-binary-file-arch
- Owner: samuelmaddock
- Created: 2023-11-20T19:57:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T22:17:12.000Z (over 2 years ago)
- Last Synced: 2025-02-28T10:49:26.657Z (over 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# read-binary-file-arch
A node module that reads the [CPU architecture](https://nodejs.org/api/process.html#processarch) of a binary file.
npm install read-binary-file-arch
## Usage
Pass a file path to `readBinaryFileArch`.
> [!NOTE]
> Windows only supports valid PE binary files.
```js
var { readBinaryFileArch } = require('read-binary-file-arch');
readBinaryFileArch(filePath).then((arch) => {
console.log('arch: ', arch);
}).catch((error) => {
console.error(error.message);
});
```
## License
MIT