code: function isUnpackedDir (dirPath, pattern, unpackDirs) {
    if (dirPath.startsWith(pattern) || minimatch(dirPath, pattern)) {
      if (!unpackDirs.includes(dirPath)) {
        unpackDirs.push(dirPath)
      }
      return true
    } else {
      return unpackDirs.some(unpackDir => dirPath.startsWith(unpackDir))
    }
  }
docs: Whether a directory should be excluded from packing due to the `--unpack-dir" option.
  
  @param {string} dirPath - directory path to check
  @param {string} pattern - literal prefix [for backward compatibility] or glob pattern
  @param {array} unpackDirs - Array of directory paths previously marked as unpacked