INNER CODE UNIT · JavaScript

targetPaths

ImranR98/apps.obtainium.imranr.dev · scripts/validate_icons.js:11

const targetPaths = args.filter(a => !a.startsWith('--'))

const CONCURRENCY = 10
const ATTEMPTS = 3
const TIMEOUT_MS = 10000
const USER_AGENT =
  'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36'

function getAllJsonFiles(dir) {
  const results = []
  const items = fs.readdirSync(dir)
  for (const item of items) {
    const fullPath = path.join(dir, item)
    const stat = fs.statSync(fullPath)
    if (stat.isDirectory()) {
      results.push(...getAllJsonFiles(fullPath))
    } else if (item.endsWith('.json')) {
      results.push(fullPath)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…