Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const isBinaryFile = async filePath => {
const ext = path.extname(filePath).slice(1);
if (ext) {
if (textExtensions.includes(ext)) { return false; }
if (binaryExtensions.includes(ext)) { return true; }
}
return _isBinaryFile(filePath);
}