How to use the binaryextensions.includes function in binaryextensions

To help you get started, we’ve selected a few binaryextensions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpusCapita / filemanager / packages / server-nodejs / router / lib.js View on Github external
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);
}

binaryextensions

A package that contains an array of every single file extension there is for binary files

Artistic-2.0
Latest version published 12 months ago

Package Health Score

76 / 100
Full package analysis

Popular binaryextensions functions