A WebAssembly compiled version of libmagic with a simple API for Node. WASMagic provides accurate filetype detection with zero prod dependencies
Why do you think that https://github.com/kaitai-io/kaitai_struct_formats is a good alternative to wasmagic