How to use the binary-extensions.includes function in binary-extensions

To help you get started, we’ve selected a few binary-extensions 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 beakerbrowser / beaker / app / lib / mime.js View on Github external
export function isFileNameBinary (filepath) {
  const ext = path.extname(filepath)
  if (binextensions.includes(ext)) return true
  if (textextensions.includes(ext)) return false
  // dont know
}
github beakerbrowser / beaker-core / lib / mime.js View on Github external
exports.isFileNameBinary = function (filepath) {
  const ext = path.extname(filepath)
  if (binextensions.includes(ext)) return true
  if (textextensions.includes(ext)) return false
  // dont know
}
github rdgd / twly / index.js View on Github external
function isTextFile (filePath) {
  return !binaries.includes(filePath.split('.').pop());
}
github beakerbrowser / beaker / app / builtin-pages / com / files-browser / file-preview.js View on Github external
function isBinaryExtension (fileName) {
  var nameParts = fileName.split('.')
  if (nameParts.length > 1) {
    var ext = nameParts.pop()
    if (ext && BINARY_EXTENSIONS.includes(ext.toLowerCase()) === true) {
      return true
    }
  }
  return false
}
github beakerbrowser / beaker / app / builtin-pages / com / library / createfile-popup.js View on Github external
function isBinaryExtension (fileName) {
  var nameParts = fileName.split('.')
  if (nameParts.length > 1) {
    lastTriedExt = nameParts.pop()
    if (lastTriedExt && BINARY_EXTENSIONS.includes(lastTriedExt.toLowerCase()) === true) {
      return true
    }
  }
  return false
}

binary-extensions

List of binary file extensions

MIT
Latest version published 3 months ago

Package Health Score

85 / 100
Full package analysis