NPM package to test if binary is 64 or 32 bits
npm i binary-bit
Return "32", "64" or "unknow"
Return true if it is a 64 bits binary
Return true if it is a 32 bits binary
#!/usr/bin/env node
const binarybit = require('binary-bit')
var binFile = "C:\temp\example.exe";
var result = binarybit.binaryBit(binFile);
if (result == "32")
console.log("32 bit binary");
else if(result == "64")
console.log("64 bit binary");
else
console.log("Is this a binary file?");