Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/libnpmdiff/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/libnpmdiff/lib/should-print-patch.js
const { basename, extname } = require('path')

const binaryExtensions = require('binary-extensions')

// we should try to print patches as long as the
// extension is not identified as binary files
const shouldPrintPatch = (path, opts = {}) => {
  if (opts.diffText) {
    return true
  }

  const filename = basename(path)
  const extension = (
    filename.startsWith('.')
      ? filename
      : extname(filename)
  ).slice(1)

  return !binaryExtensions.includes(extension)
}

module.exports = shouldPrintPatch

ZeroDay Forums Mini