lib/cpu.js
function get_cpu_arch(major, minor) {
  if (major === CPU_TYPE_ARM64) {
    return 'arm64';
  }

  if (major === CPU_TYPE_X86) {
    return 'i386';
  }

  if (major === CPU_TYPE_X86_64) {
    return 'x86_64';
  }

  if (major === CPU_TYPE_ARM) {
    return CPU_ARM_TYPES[minor] || 'arm';
  }

  return `unknown(${major},${minor})`
}
function get_cpu_arch(major, minor) {
  if (major === CPU_TYPE_ARM64) {
    return 'arm64';
  }

  if (major === CPU_TYPE_X86) {
    return 'i386';
  }

  if (major === CPU_TYPE_X86_64) {
    return 'x86_64';
  }

  if (major === CPU_TYPE_ARM) {
    return CPU_ARM_TYPES[minor] || 'arm';
  }

  return `unknown(${major},${minor})`
}
function get_cpu_arch ( major , minor ) { if ( major === CPU_TYPE_ARM64 ) { return 'arm64' ; } if ( major === CPU_TYPE_X86 ) { return 'i386' ; } if ( major === CPU_TYPE_X86_64 ) { return 'x86_64' ; } if ( major === CPU_TYPE_ARM ) { return CPU_ARM_TYPES [ minor ] || 'arm' ; } return ` ${ major } ${ minor } ` }
Finds the CPU arch name using a major/minor type
number. If we can't find the arch, we just wrap
the major/minor in an "unknown()" binding.

@param major the major CPU type.
@param minor the minor CPU type.
@returns {*} the arch of the CPU type.
Finds the CPU arch name using a major / minor type number . If we can t find the arch we just wrap the major / minor in an unknown () binding .