A Node.js package for detecting AVX instruction set support on x86 processors.
pnpm add detect-avxTip
Building a Vite app? vite-plugin-native-modules handles detect-avx automatically.
import detectAvx from "detect-avx";
const result = detectAvx();
console.log(result); // 'avx2', 'avx', or 'none''avx2'- CPU supports AVX2 instructions'avx'- CPU supports AVX instructions (but not AVX2)'none'- CPU does not support AVX instructions (or running on non-x86 platform like ARM)
MIT